![]() In our next article, we’ll cover up more or advanced ls commands with their examples. To remove an alias previously defined, just use the unalias command. # aliasĪlias which='alias | /usr/bin/which -tty-only -read-alias -show-dot -show-tilde' Note: We can see a number of aliases available in your system with the below alias command and the same can be unalias as shown below example. We have made an alias for ls command, when we execute ls command it’ll take the -l option by default and display a long listing as mentioned earlier. To display UID and GID of files and directories. 2 gdm gdm 4096 Aug 21 11:26 pulse-wJtcweUCtvhn 2 narad narad 4096 Aug 4 08:16 pulse-UDH76ExwUVoUĭrwx. 2 root root 4096 Aug 16 01:33 keyring-pioZJrĭrwx. Wherein with -ld parameters displays information of /tmp directory. With ls -l command list files under directory /tmp. The help page of ls command with their option. There is NO WARRANTY, to the extent permitted by law. This is free software: you are free to change and redistribute it. License GPLv3+: GNU GPL version 3 or later. # ls -versionĬopyright (C) 2010 Free Software Foundation, Inc. With -i options list file/directory with an inode number. We can see some numbers printed before the file/directory name. Display Inode number of File or Directory With a combination of -lS displays file size in order, will display big in size first. List Files and Directories in Reverse Order in LinuxĪ combination of -ltr will show the latest modification file or directory date as last. rw-r-r- 1 lighttpd lighttpd 7858 Aug 21 15:26 access.log rw-r-r- 1 root root 0 Aug 19 03:14 access_log 1 root root 33408 Aug 8 17:25 anaconda.log See an example of the output of the command. Ls -R option will list very long listing directory trees. Recursively list Sub-Directories in Linux # ls -rįbcmd_update.php Documents anaconda-ks.cfg The following command with the ls -r option display files and directories in reverse order. # ls -FĪnaconda-ks.cfg Documents/ fbcmd_update.php install.log Using the -F option with the ls command will add the '/' character at the end of each directory. List Files and Directories with ‘/’ Character at the End 2 root root 4.0K Jul 31 02:48 Templatesĭrwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Publicĭrwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Picturesĭrwxr-xr-x. 1 root root 21K Aug 12 12:42 fbcmd_update.php 2 root root 4.0K Jul 31 02:48 Documentsĭrwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Desktopĭrwxr-xr-x. 1 root root 1.6K Jul 31 02:17 anaconda-ks.cfgĭrwxr-xr-x. With a combination of -lh option, shows sizes in a human-readable format. List all files including hidden files starting with ‘. 2 root root 4096 Jul 31 02:48 Templatesĭrwxr-xr-x. ![]() 1 root root 21262 Aug 12 12:42 fbcmd_update.php 2 root root 4096 Jul 31 02:48 Documentsĭrwxr-xr-x. Here, ls -l ( -l is a character, not one) shows file or directory, size, modified date and time, file or folder name and owner of the file, and its permission.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |