1] cd (change directories) :-
cd followed by the name of a directory to access that directory. Keep in mind that you are always in a directory and allowed access to any directories hierarchically above or below.
If the directory application is not located hierarchically below the current directory, then the complete path must be written out.
Ex:
cd /usr/application
cd /usr/application
To move up one directory, use the shortcut command.
Ex:
cd ..
cd ..
===========================================
2] ls (list files and directories) :-
ls to see a list of the files and directories located in the current directory. If you’re in the directory named application and you type ls, a list will appear that contains files in the games directory and sub-directories in the games directory.
Ex:
ls Mail
ls /usr/local :
ls /usr/local :
ls -alt to see a list of all files (including .rc files) and all directories located in the current directory. The listing will include detailed, often useful information
Ex:
ls -alt
ls -alt /usr/local
ls -alt /usr/local
If the screen flies by and you miss seeing a number of files, try using the |more at the end like:
Ex:
ls -alt | more
===========================================
3] pwd (present working directory) :-
pwd and hit enter. You’ll see the full name of the directory you are currently in. This is your directory path and is very handy. This is especially handy when you forget which directory you’ve changed to and are trying to run other commands.
Ex:
pwd
===========================================
4] mkdir ( Make Directory ) :-
mkdir is used to make directories in Linux. There aren’t many options I use with this Linux command either. There is only 1 option I use with the mkdir command on a regular basis. The usage for mkdir is very simple mkdir [options] [directory].
Ex:
mkdir example
===========================================
5]cat (concatenate files) :-
cat command is the Unix command to list a file’s contents onto your screen, or pass via pipeline to use with other Linux commands. The cat command comes from the word concatenate.
The usage of the Linux cat command is cat [options] [file].
Ex:
cat test
===========================================