Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tar
#1

if i have a directory with many *.conf files, and i also in the same directory have other files that end with *.tar and *.gz. And i want to compress all files in that directory execpt the allready compresed files like *.tar and *.gz

 

tar cf funnet.tar * except ?

 

 

also how can i find files that have not been modified in like 1 year ? i know there is atime fuction, but what should i use when we speak of years.. ?

 

 

-knut

Reply
#2

man find!

 

 

;)

Reply
#3

well i have tried, can you show me then :)

 

knut

Reply
#4

Why don't you just use 'tar -cf funnet.tar --exclude '*.tar' --exclude '*.gz' *' and 'find /directory ! -mtime -365 -print' (assuming the year has 365 days)? :)

 

z0ny

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)