Directory browsing and listing commands

Directory listing commands

01. See a current location (print work directory)

02. List content in the folder

03. List all content in the folder (Hidden file)
#ls -a
#tree -a

Object Color Codes

White Color – Text base files (Htmal , Java, etc….)
Dark Blue – Folders
Green – Executable binary files and executable text file (Scripts) or any files copied from windows to Linux.
Red – Compressed files (gzip, etc….)
Purple – Multimedia files (Mp3, Pictures)
Orange – Device Driver File
Light blue color – Symlinks (Short Cuts)

04. See a long list
#ls -l

05. Long list with a hidden file
#ls -la

06. Long list, with color, and hidden files and fit to screen
#ls --color -la |more

Directory browsing commands

To go to sub folders

Use the relative path of the folder
Don’t type the current location that you are in

Ex - #cd test
#cd uddika

To go to main folders

Use full path
Always start with /

Ex - #cd /etc
#cd /usr/share

07. One folder back
#cd ..

08. To your home folder

09. To previous location
#cd -

10. To root partitions
#cd /