Difference between revisions of "Find"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 2: Line 2:
  
 
= find files older than ... =
 
= find files older than ... =
  find <Ordner> -ctime +5 -exec ls {} \;
+
To find files in ''folder'' that are older than ''5'' days use
 +
  find ''folder'' -ctime +''5'' -exec ls {} \;
  
 
= find files that have content =
 
= find files that have content =
Line 9: Line 10:
 
= find files by content =
 
= find files by content =
 
To find files by content you do not use find, but [[grep]].
 
To find files by content you do not use find, but [[grep]].
 +
 +
= See also =
 +
* [http://man-wiki.net/index.php/1:find find's man page]

Revision as of 04:55, 28 April 2009

Find allows you to find files, e.g.

find files older than ...

To find files in folder that are older than 5 days use

find folder -ctime +5 -exec ls {} \;

find files that have content

find -not -empty -iname "foo*"

find files by content

To find files by content you do not use find, but grep.

See also