

We can use the up and down keys to navigate through the screen. Inorder to list the information of a specific directory, run the following command. The dot (.) at the end of the command implies the current working directory. To list the files and directories in the current working directory using vim editor, run the command shown below. This implies that a directory is also a file which contains some list of files and subdirectories.

We already know that everything is considered as a file in Linux. In addition to viewing and editing files, vim editor can also be used for listing files and directories. Use the following command shown below.įor i in * do echo $i done 10. This is another method to list the contents of the directory. Access rights to group, owner and others.All the group names which has access to the file or directory.The key features of this command is that it not only lists the contents of the directory but also other details such as To display the files and directories in the current working directory, just run the following command. The getfacl and setfacl are two of the mostt important and useful commands every system administrator should know to set the Access Control Lists of the files and directories. Listing Directories Using Getfacl Command This command displays only the contents of the directory just down one level which means it cannot display other subdirectories and its contents and also hidden files. To list the files and directories in the current directory use the following command. To list the contents of the directory using grep command run the following command. This command is used for searching text files using regular expressions. Use the following command line to list the files and directories With the help of this command, we can find the properties of file such as file size, permissions, modified date, etc. This command is used to display the information of files and filesystem. If you want to search only the directories and skip the file names use the -type d option as shown below.įind / -type d -name "apk" -ls 5.
#Linux file details how to#
How to List only Directories Using Find Command The dot (.) symbol indicates the current working directory. To display all files which are present in the current working directory, use the following command. You can search files by name, extension, group, modification date, permissions etc. The find command helps us to look up for files for which we know only the approximate names.In simple words the find command searches for a file in the current working directory and recursively through the subdirectories that matches the given search criteria. The output will display both files and directories.

To display the contents of current working directory run the following command. It will display the given parameters in the specified format or execute the command depending on the option specified. This command is used for formatting and printing text. In the above output, d indicates directories. To print the detailed information of each file and directory use the -l command-line option. The forward slash in the above output indicates the directory and others indicate files. The dir command is used to list the contents of the directory.
