![]() ![]() These are just a few alternatives to the 'ls' command to list the contents of a directory, which is not other to know.'ls' is a frequently used command in Linux. We will also be able to move through the subdirectories. Using the UP / DOWN arrows we can navigate through the list. We will only have to write the following, keeping in mind the point after vim: It can Know more about this command use man:Įl editor Vim can also be used for list files and directories. To withdraw from your view the list of files and directories in the current directory, we will simply execute: The command getfacl together with setfacl, are the most useful and important commands that all system administrators should know when setting access control lists (ACLs). See man pages for details about command lsattr. For list files and directories in current working directory, we will use this command: The command lsattr It is used to list the attributes of files and directories in Gnu / Linux. We can use man pages to get more information: We can list files and directories using command stat:Īs you can see, the stat command not only lists the contents of the current directory, but also the permissions and size of each file and directory. With this command, we can view the properties of files and directories such as size, permissions and creation, among others. ![]() The command stat used to display file and file system information. ![]() We can know more about find in your man page: We can also view the contents of a specific directory: find dir1/ The first command shows all files and directories in current directory, while the second command show all files and directories recursively. We can also use this command to view directory content: find -maxdepth 1 The command find used to search for files in a directory hierarchy. It can get more information about this command using man: To withdraw from your list directory contents using command grep, you just have to run: A colleague wrote an article about how to use this command. Grep used to search using regular expressions. To withdraw from your more details, see the man pages: We can also use it to list the contents of the current directory: This command will print the arguments according to the given format. The command printf it is commonly used to format and print text. We can see more details about dir in the man pages: We will also be able to list all the content, including files hidden by typing: To withdraw from your list the contents of a specific directory, you just have to pass the path as an argument: For list the contents of the current directory you just have to write: This command many consider it equivalent to the one used in Windows, since it works in Gnu / Linux in more or less the same way. *Ĭonsultation more details in the man pages: To withdraw from your list hidden files we will execute: echo *. To withdraw from your display the content of the next level of directories It can be used: This command not only serves to print the given arguments, but can also be used to list files in terminal (Ctrl + Alt + T): Any text or string can be passed as an argument. ![]() This command is commonly used in shell scripts and batch programs to print the given arguments. List the contents of a directory with some alternatives to the ls command Use the command threw out 1 List the contents of a directory with some alternatives to the ls command. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |