Delete files which are N days old
find *.* -mtime -15 -exec rm -rf {}\;
find does the recursive search
find / -name filename
/ searches from the root.
2.find . -name "*.c" -print.
. searches in current directory and will give relative path.
3.Find $HOME
find /home -atime +365 -print
which are not accessed from a year
4.find .! -name "*.c" -print
To negate -> it will select everything but the c files
options :
-size +2048
-inum 12345
-type f
find *.* -mtime -15 -exec rm -rf {}\;
find does the recursive search
find / -name filename
/ searches from the root.
2.find . -name "*.c" -print.
. searches in current directory and will give relative path.
3.Find $HOME
find /home -atime +365 -print
which are not accessed from a year
4.find .! -name "*.c" -print
To negate -> it will select everything but the c files
options :
-size +2048
-inum 12345
-type f
No comments:
Post a Comment