Difference between revisions of "Ls"

From Linuxintro
imported>ThorstenStaerk
imported>ChrisM
Line 19: Line 19:
 
  df -h
 
  df -h
 
tells you how much disk space is left.
 
tells you how much disk space is left.
 +
 +
== find out the size of a directory ==
 +
Change to directory and:
 +
du -sh

Revision as of 16:44, 23 March 2009

ls list files in a given directory. If no directory is given, it lists the files in the current working directory:

tweedleburg:~/svn/kdepim # ls
.emacs-dirvars       README.Kolab           kdgantt1           ktimetracker
.kateconfig          akonadi                kitchensync        lib
[...]

How to...

only list directories

ls -d */

list with the latest changed files below

ls -ltr

find out the free disk space

You do not use ls, but df:

df -h

tells you how much disk space is left.

find out the size of a directory

Change to directory and:

du -sh