Change directory modification date

Hello

I need to change the modification date on a directory to 01-JAN-2006

I know you can change the modfication time on files using touch but I
wondered if there was an equivilant for directories

Thanks in advance
Gareth [ Fr, 04 April 2008 11:45 ] [ ID #1935286 ]

Re: Change directory modification date

For me touch also works with directories. I have bash on cygwin

$ ls -ld test
drwxrwxrwx+ 2 18035 mkgroup-l-d 0 Apr 4 12:40 test
$ touch -d yesterday test
$ ls -ld test
drwxrwxrwx+ 2 18035 mkgroup-l-d 0 Apr 3 12:40 test
$ $0 --version
GNU bash, version 3.2.33(18)-release (i686-pc-cygwin)
Copyright (C) 2007 Free Software Foundation, Inc.
Florian Kaufmann [ Fr, 04 April 2008 12:43 ] [ ID #1935287 ]

Re: Change directory modification date

Thanks for that

I was using the wrong syntax with touch for the directories. It has
worked after all!!
Gareth [ Fr, 04 April 2008 18:10 ] [ ID #1935296 ]
Linux » comp.unix.shell » Change directory modification date

Vorheriges Thema: [ANN] parallel 1.3: simple parallel processing.
Nächstes Thema: I need to know a correct group to ask this question