![]() ![]() ![]() 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. we can print only the directory names by using the following command. While using the long listing option –l we can grep the lines that starts with d. This option allows us to grep directories by ‘grep’ing lines that ends with forward slash. ![]() The -F option adds a trailing forward slash. To list directories in the Long listing format use the -l option. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |