Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Change Create Date on Directory
Results 1 to 3 of 3

Thread: Change Create Date on Directory

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Location
    Melbourne, Australia
    Posts
    94

    Change Create Date on Directory

    I want to run a script to delete any directory over a certain age, so for testing I want to create a bunch of dir's and change their date to one over 30 days old. Anyone know how to modify the create date on a directory?

    Cheers,

    David.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  2. #2

    re: Change Create Date on Directory

    Strictly speaking, Linux/Unix files don't have "Create" dates. They have, among other things, "Change" dates which indicate the last time the status information of the file was changed. For lots of information, read $(man 2 stat).

    As a partial answer to the question, see this small shell sample:

    [cdl@delta try]$ mkdir foo.d
    [cdl@delta try]$ ls -ld foo.d
    drwxrwxr-x 2 cdl cdl 4096 Nov 1 11:00 foo.d/
    [cdl@delta try]$ touch --date=1-oct-2007 foo.d
    [cdl@delta try]$ ls -ld foo.d
    drwxrwxr-x 2 cdl cdl 4096 Oct 1 00:00 foo.d/

    carl

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Location
    Melbourne, Australia
    Posts
    94
    Quote Originally Posted by clowenstein View Post
    Strictly speaking, Linux/Unix files don't have "Create" dates. They have, among other things, "Change" dates which indicate the last time the status information of the file was changed. For lots of information, read $(man 2 stat).

    As a partial answer to the question, see this small shell sample:

    [cdl@delta try]$ mkdir foo.d
    [cdl@delta try]$ ls -ld foo.d
    drwxrwxr-x 2 cdl cdl 4096 Nov 1 11:00 foo.d/
    [cdl@delta try]$ touch --date=1-oct-2007 foo.d
    [cdl@delta try]$ ls -ld foo.d
    drwxrwxr-x 2 cdl cdl 4096 Oct 1 00:00 foo.d/

    carl
    Champion, Carl. Just what I was after. Thanks mate.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Similar Threads

  1. change open office date format
    By svar in forum Linux - General Topics
    Replies: 0
    Last Post: 11-12-2010, 09:27 AM
  2. change path of users home directory
    By atomicmak in forum Linux - General Topics
    Replies: 2
    Last Post: 04-03-2005, 09:51 AM
  3. Access can't change the working directory to
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-04-2005, 01:44 AM
  4. I got a date!!!
    By gmoreno in forum General Chat
    Replies: 37
    Last Post: 04-25-2003, 04:04 AM
  5. How to change Mutt's mail directory ?
    By Compunuts in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 03-26-2002, 04:24 PM

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
  •