How to archive the old files in unix box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gsreenathreddy
    New Member
    • Oct 2007
    • 40

    How to archive the old files in unix box

    Hi All,

    I have a requirement that will that needs to archieve the old files which are 30 days old files.

    Thanks,
    Sreenath
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    What do you mean 'archive'? Move to another system? Compress?

    What have you tried? What isn't working with what you've already tried?

    Comment

    • Luuk
      Recognized Expert Top Contributor
      • Mar 2012
      • 1043

      #3
      If 'archieve' means 'archive'

      Code:
      find . -mtime 30 -exec zip -m archive.zip {} \;

      Comment

      • programmingserv
        New Member
        • Jun 2012
        • 1

        #4
        I agree with Luuk regarding archieve the old files in unix box, Keep it up.

        Comment

        • vakula
          New Member
          • Dec 2012
          • 3

          #5
          Code:
          find . -mtime 30|xargs -d "\n" tar -czvf backup.tar.gz
          taken from <link removed>
          Last edited by Rabbit; Dec 31 '12, 08:38 AM. Reason: Link to outside site removed.

          Comment

          • Luuk
            Recognized Expert Top Contributor
            • Mar 2012
            • 1043

            #6
            @vakula: This thread is 6 month old...... ?

            Comment

            Working...