Web Design

Categorized | cli

Easy search and archiving of files in Linux

Say you have a folder full of downloads and you don’t need the files you got prior to the day before yesterday. This command will search for and archive all files bigger than 100Kb and older than 48hrs:

find /path/to/directory/ -type f -mtime -2 -size +100k | xargs tar -zcvf archive.tgz

Author Profile

T4L ;

Other posts by T4L

Author's web site



Are you satisfied with this blog?
Why not subscribe our RSS Feed? you will always get the latest post.


Hi, Be the first leave some reply

Leave A Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>