LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2004, 04:59 PM   #16
looseCannon
Member
 
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193

Rep: Reputation: 31

Quote:
Originally posted by linuxtesting2
thanks for all help. i have ended up with the following command:
!
find /map -size +10k -name '*' ! -mtime -365 | grep -v .tar | grep -v .gz | grep -v .tgz | grep -v .zip | grep -v .rar | grep -v .bz2 | grep -v .tar.gz | xargs tar cvfz backup.tgz

It now finds every file that is bigger than 10kilobytes exepct those tgz rar.... and zip does down to a file....


-ole
You can make that nasty command a little shorter with egrep.

find map -size +10K -name '*' ! -mtime -365|egrep -v '.tar|.gz|.tgz|.zip|.rar|.bz2|.tar.gz'|xargs tar cvzf backup.tgz

A little shorter, maybe more confusing.
 
Old 10-22-2004, 03:14 PM   #17
Linux24
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.1
Posts: 204

Rep: Reputation: 30
Quote:
Originally posted by looseCannon
You can make that nasty command a little shorter with egrep.

find map -size +10K -name '*' ! -mtime -365|egrep -v '.tar|.gz|.tgz|.zip|.rar|.bz2|.tar.gz'|xargs tar cvzf backup.tgz

A little shorter, maybe more confusing.
Cool. I never use egrep. I'll hve to take a look at it.

The best way to shorten that command that I know of is to only make one kind of archive and stick to it so I only have one file extension to filter out. LOL!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Solaris 8 gzip issues- cannot gzip -d lynx sixosix Solaris / OpenSolaris 4 03-13-2005 04:17 PM
newbi needs help emek311 Linux - Hardware 1 07-15-2004 10:51 PM
Total Newbi VashTheStampede Linux - Newbie 16 07-24-2003 11:17 PM
A newbi plea for help!! matrim Linux - Newbie 2 12-12-2002 02:48 AM
Help Newbi needs help with named and webserver firestorm Linux - Networking 3 11-28-2000 07:09 AM


All times are GMT -5. The time now is 11:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration