Results 1 to 3 of 3

Thread: Automaticaly delete old files.

  1. #1
    Join Date
    Aug 2013
    Beans
    8

    Question Automaticaly delete old files.

    Hello to all.
    I would like to make a cron job on my ubuntu machine.
    The machine has an account legitimate on WINDOWS 2003 server. I want to search the file server and if it finds a file 6 years old that has not be modified since then to delete it.
    So the actual question is how to write the rm command to do this job?
    Thank you in advance.

  2. #2
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,461

    Re: Automaticaly delete old files.

    It sounds like a dangerous thing to me. But if you're sure you want to proceed, use 'find'. See http://www.howtogeek.com/howto/ubunt...days-on-linux/ for an instruction to delete files older than x days.

    HTH

  3. #3
    Join Date
    Aug 2013
    Beans
    8

    Re: Automaticaly delete old files.

    Quote Originally Posted by sanderj View Post
    It sounds like a dangerous thing to me. But if you're sure you want to proceed, use 'find'. See http://www.howtogeek.com/howto/ubunt...days-on-linux/ for an instruction to delete files older than x days.

    HTH
    Thank you!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •