File and Directory related command for Linux (Ubuntu)

Here we will learn about the command related to File System

List of File in Folder

ls command can be used to list down all the files in Folder.

 

Note*: All command in Linux are case sensitive. So ls or Ls or lS or LS all are different.

By default ls command will show the files from current directory. If you want to display list of files from different directory then provide the directory path as an argument.

 

With ls you will get list of files and folder in alphabetical order. If you want to see other details of files/folder you can user other argument with ls.

Available argument

  •    -l   :  Show long listing format of file or folder

 

 

  • -a (minus and small A) : ls by default ignores . (Current directory) and .. (Parent Directory) -a is used to display .. and . while listing files and folders.

  • –file-type : Used to identify file types

Here Hadoop and ShellScript are directories while others are files. As you can differenciate by seeing / in the end.

Leave A Comment

Your email address will not be published. Required fields are marked *