PuTTY – 20 Useful Putty Commands
Useful SSH Putty Commands
1.) How to find out where you are, the pwd command shows you present working directory.
pwd
2.) Change directory
cd
The cd command is used to navigate into a specified directory on your server.
Example: cd /home (moves you into the home folder)
3.) The same directory
cd .
Using this command you will remain in the same directory you were.
4.) Move me up one directory
cd ..
Above command will navigate two steps back from current directory
5.) Go to the previous directory
cd –
Above command will navigate to the previous directory.
6.) Go to Home folder
cd ~
Above command will navigate to the home directory on your server.
7.) Go to root
cd /
Above command will navigate to root.
How to List Directories and Contents
8.) List files
ls
usage: ls [option] [file]
Using the ls command in a folder will display all it’s content.
Example: ls /home.
Will return all content of the folder /home.
9.) Show me all files in a directory
ls -a
10.) Show contents with file size
ls -h
If you wish to see a directory’s contents with file sizes just type ls -h
11.) How to see sub-directories recursively
ls -r
The ls -r command is used to see sub-directories recursively.
12.) How to see files by file size
ls -is
13.) List all folders in directory with details
ls -alh
ls
usage: ls [option] [file]
Post a Comment