Difference between revisions of "Ls"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<code>ls</code> is a command to list computer files in Linux and Unix and Unix-like operating systems. == Linux Examples == * <code>ls</code> * <code>ls -lhaR</...")
 
Line 9: Line 9:
 
** <code>ls -lRh | sort -rnk5</code>
 
** <code>ls -lRh | sort -rnk5</code>
 
** Including full path: <code>ls -ldh $([[linux/Basic commands/find|find]] ./) | sort -rnk5</code>
 
** Including full path: <code>ls -ldh $([[linux/Basic commands/find|find]] ./) | sort -rnk5</code>
 +
 +
 +
== Related commands ==
 +
* <code>[[find]]</code>
 +
* <code>[[du]]</code>
 +
* <code>[[df]]</code>

Revision as of 07:39, 7 January 2020

ls is a command to list computer files in Linux and Unix and Unix-like operating systems.


Linux Examples

  • ls
  • ls -lhaR
  • One line listing with sizes using ls and find: ls -ldh $(find /path/to/search/)
  • Sort by size:
    • ls -lRh | sort -rnk5
    • Including full path: ls -ldh $(find ./) | sort -rnk5


Related commands

Advertising: