Thursday, February 9, 2012

How to list all the files in the directory?

Just get to know how to list all the files in the current directory,how to list all the files in the curretnt directory with its associated directories and how to list all the files with specific shell pattern in current directory and all of its associated subdirectories.





Open terminal using Applications ---> Accessories ---> Terminal (or) Press Ctrl + Alt + t.


Step 1 :  To list all the files in the current directory type as follows


                ls







Step 2 :  To list all the files in the current directory with its associated directories,use the command.

               ls -R





Step 3 :  To list all the files with specific shell pattern in current directory and all of its associated subdirectories,use the command.

               ls -R *.jpg






 

Its so simple,right!

No comments:

Post a Comment