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 08-12-2013, 03:24 PM   #16
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495

Quote:
Originally Posted by akamel View Post
I don't know how to use the code flags, as I'm new here
I was asking if there is a better way than using the 365 days!

Did you checked the code?
you have one way and i have told you how to use code tags. read above.
 
Old 08-12-2013, 03:25 PM   #17
akamel
Member
 
Registered: Dec 2012
Posts: 100

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by lleb View Post
you have one way and i have told you how to use code tags. read above.
Yeah
 
Old 08-12-2013, 03:27 PM   #18
akamel
Member
 
Registered: Dec 2012
Posts: 100

Original Poster
Rep: Reputation: 1
Just let me know how to find one year old files and Tar them, I read the Man pages and got that, please correct me if I'm wrong:

find $SOURCE -type f -mtime +31 | xargs tar -jcvf backup.tar.bz2
 
Old 08-12-2013, 03:31 PM   #19
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
you failed to change anything of value in your command and are still refusing to use code flags, have a good day.
 
1 members found this post helpful.
Old 08-12-2013, 03:36 PM   #20
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,921

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Quote:
Originally Posted by akamel View Post
Just let me know how to find one year old files and Tar them, I read the Man pages and got that, please correct me if I'm wrong:

find $SOURCE -type f -mtime +31 | xargs tar -jcvf backup.tar.bz2
AGAIN
  • Use CODE Tags on your code
  • If you DID read the man pages, you'd see how to find files that are one year old. You either haven't, or you ignored what lleb and I told you.
  • You haven't read the man pages on the tar command.
We have given you advice, but you ignore it. AGAIN..we WILL NOT do this for you. Also, AGAIN, have you read ANY of the very easily-found bash scripting tutorials (such as...the one in my posting signature???) Tried to Google anything? There are THOUSANDS of sample scripts that do what you're looking for...again, showing some effort of your own would help.
 
1 members found this post helpful.
Old 08-12-2013, 03:44 PM   #21
akamel
Member
 
Registered: Dec 2012
Posts: 100

Original Poster
Rep: Reputation: 1
# Sorry for that!
Quote:
Originally Posted by akamel View Post
Just let me know how to find one year old files and Tar them, I read the Man pages and got that, please correct me if I'm wrong:

find $SOURCE -type f -mtime +365 | xargs tar -jcvf backup.tar.bz2
 
Old 08-12-2013, 03:56 PM   #22
akamel
Member
 
Registered: Dec 2012
Posts: 100

Original Poster
Rep: Reputation: 1
Anywayz thanks!
 
  


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
How to execute a ssh script on Linux server from Windows through a bat script? wanna13e Programming 13 10-23-2009 03:41 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 05:21 PM


All times are GMT -5. The time now is 04:55 AM.

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