Difference between revisions of "Ls"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Line 5: Line 5:
 
== Linux Examples ==
 
== Linux Examples ==
 
* <code>ls</code>
 
* <code>ls</code>
 +
* <code>ll</code> ([[alias]] from <code>ls -laF</code>)
 
* <code>ls -l</code>
 
* <code>ls -l</code>
 
* <code>ls -lh</code>
 
* <code>ls -lh</code>

Revision as of 16:13, 21 April 2020

ls is a command to list files, directories and symbolic links in Linux and Unix-like operating systems include in the coreutils package in Ubuntu.


Linux Examples

  • ls
  • ll (alias from ls -laF)
  • ls -l
  • ls -lh
  • ls -lhaR
  • One line listing with sizes using ls and find: ls -ldh $(find /path/to/search/)
  • Sort by size:
    • ls -lhS
    • ls -lR | grep '^-' | sort -rnk5 (sort will not work if ls is used with -h)
    • Including full path: ls -ld $(find ./) | sort -rnk5 | more
-su: /bin/ls: Argument list too long
-d list directories themselves, not their contents
  • ls -la -block use SIZE-byte blocks

Related commands


See also

Advertising: