V 
VPS Hosting Referral Code PCGPDB


MAN PAGES INDEX
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 31, 2010, 09:06:01 AM

Login with username, password and session length
« previous next »
Pages: [1] Print
Author Topic: find  (Read 1144 times)
bashconsole
Administrator
Newbie
*****
Posts: 30


View Profile Email
« on: May 10, 2009, 02:44:04 PM »

NAME
       find - search for files in a directory hierarchy

SYNOPSIS
       find [-H] [-L] [-P] [path...] [expression]

DESCRIPTION
       This manual page documents the GNU version of find.  GNU find searches the directory tree rooted at each
       given file name by evaluating the given expression from left to right, according to the rules of  prece-
       dence  (see  section  OPERATORS), until the outcome is known (the left hand side is false for and opera-
       tions, true for or), at which point find moves on to the next file name.

       If you are using find in an environment where security is important (for example if you are using it  to
       seach directories that are writable by other users), you should read the "Security Considerations" chap-
       ter of the findutils documentation, which is called Finding Files and comes with findutils.   That docu-
       ment  also  includes  a  lot more detail and discussion than this manual page, so you may find it a more
       useful source of information.

http://bashconsole.org/man.1.find
Logged
bashconsole
Administrator
Newbie
*****
Posts: 30


View Profile Email
« Reply #1 on: May 10, 2009, 02:48:31 PM »


Delete all files that were untouched during 7 days. Search directory depth 10.
Code:
$ find dir/  -type f -mtime 7 -maxdepth 10 -print0 -exec rm \{} \;
Logged
Pages: [1] Print
« previous next »
Jump to:  

Page created in 0.056 seconds with 21 queries. (Pretty URLs adds 0.01s, 2q)