Jump to content
Sign in to follow this  
Guest Guest_knut

tar

Recommended Posts

Guest Guest_knut

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...