Editing Ls
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | <code>[[wikipedia:ls|ls]]</code> is a command to list computer files in [[Linux]] and Unix and Unix-like operating systems. | |
− | <code>[[wikipedia:ls|ls]]</code> is a command to list files | ||
* Man page: http://man7.org/linux/man-pages/man1/ls.1.html | * Man page: http://man7.org/linux/man-pages/man1/ls.1.html | ||
Line 6: | Line 5: | ||
== Linux Examples == | == Linux Examples == | ||
* <code>ls</code> | * <code>ls</code> | ||
− | * | + | * <code>ls -lhaR</code> |
− | |||
− | |||
− | |||
− | |||
− | |||
* One line listing with sizes using ls and find: <code>[[ls]] -ldh $([[find]] /path/to/search/)</code> | * One line listing with sizes using ls and find: <code>[[ls]] -ldh $([[find]] /path/to/search/)</code> | ||
− | * Sort by | + | * Sort by size: |
− | + | ** <code>ls -lR | grep '^-' | sort -rnk5</code> (sort will not work if ls is used with -h) | |
− | ** <code>ls -lR | grep '^-' | | + | ** Including full path: <code>ls -ld $([[find]] ./) | sort -rnk5</code> |
− | ** Including full path: <code>ls -ld $([[find]] ./) | | ||
:::-su: /bin/ls: Argument list too long | :::-su: /bin/ls: Argument list too long | ||
− | |||
− | |||
− | |||
− | |||
− | + | == Related commands == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == Related | ||
− | |||
* <code>[[find]]</code> | * <code>[[find]]</code> | ||
* <code>[[du]]</code> | * <code>[[du]]</code> | ||
* <code>[[df]]</code> | * <code>[[df]]</code> | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
− | |||
* {{Linux filesystem commands}} | * {{Linux filesystem commands}} | ||
− | |||
* {{du}} | * {{du}} | ||
[[Category:Linux commands]] | [[Category:Linux commands]] |
Advertising: