Difference between revisions of "Ls"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
(only list directories)
Line 21: Line 21:
  
 
= How to... =
 
= How to... =
 +
 +
== only list directories ==
 +
ls -d */
  
 
== list with the latest changed files below ==
 
== list with the latest changed files below ==

Revision as of 13:53, 22 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
.krazy               akregator              kjots              libkdepim
.svn                 cmake                  kleopatra          libkholidays
CMakeCache.txt       cmake_install.cmake    kmail              libkleo
CMakeFiles           cmake_uninstall.cmake  kmailcvt           libkpgp
CMakeLists.txt       console                kmobiletools       libksieve
CMakeTmp             date.txt               knode              maildir
COPYING              dependency-graph.dot   knotes             mimelib
COPYING.DOC          doc                    kode               plugins
COPYING.LIB          icons                  kontact            strigi-analyzer
CTestTestfile.cmake  install_manifest.txt   kontactinterfaces  usability-quick-review.txt
MAINTAINERS          kaddressbook           korganizer         wizards
Mainpage.dox         kalarm                 korn
Makefile             kdepim-compat.h        kpilot
README               kdgantt                kresources

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.