Re: change file creation time on msdosfs
From d...@dan.emsphone.com Fri Aug 27 23:38:08 2010 Date: Fri, 27 Aug 2010 22:51:47 -0500 From: Dan Nelson dnel...@allantgroup.com To: Robert Bonomi bon...@mail.r-bonomi.com Cc: freebsd-questions@freebsd.org, kamik...@bsdforen.de Subject: Re: change file creation time on msdosfs In the last episode (Aug 27), Robert Bonomi said: From owner-freebsd-questi...@freebsd.org Thu Aug 26 14:33:04 2010 Date: Thu, 26 Aug 2010 21:06:04 +0200 From: Dominic Fandrey kamik...@bsdforen.de To: freebsd-questions@freebsd.org Subject: change file creation time on msdosfs I need to change the file creation time of some files on an msdosfs file system. Is there any other way to do this than copying the file and deleting the original? There are _always_ alternative ways. With suffficient knowledge, oue could, for example, use 'dd' to copy the required two bytes to the appropriate position on the raw device holding the filesystem. This approach is, however, not likely to be at all 'reasonable' for the average user. The usual suspects like touch and mv do not work. yup. 'creation' timestamp is intended to be more-or-less immutable in the Unix world. And that 'viewpoint' carries over to other kinds of filesysems grafted onto a Unix host. No; the utimes() syscall can be used to easily set the creation time (called birth time so it doesn't get confused with the ctime file metadata change time). More likely is that whoever added birthtime to ufs didn't bother updating the msdosfs code. If one of the other BSD's has implemented it, it should be relatively easy to import the changes. Otherwise you'll probably have to look at how birthtime is currently handled in ufs, and make it work in msdosfs. I repeat my previous. it is intended to be 'more-or-less' immutable. The FFS designers recognized that there would be occasions where it was _necessary_ to do so, and built the capability into the OS. The *omission* of user-tools that use that hook is/was =intentional=. A means of saying 'you really *shouldn't* do this, without absolutely prohibiting it. It _isn't_ impossbile, but the 'bar' is deliberately/intentionally out of the reach of the casual user. A backup/resture utility has good reason to muck with the 'birth date', but hardly anything else does. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: change file creation time on msdosfs
From owner-freebsd-questi...@freebsd.org Thu Aug 26 14:33:04 2010 Date: Thu, 26 Aug 2010 21:06:04 +0200 From: Dominic Fandrey kamik...@bsdforen.de To: freebsd-questions@freebsd.org Subject: change file creation time on msdosfs I need to change the file creation time of some files on an msdosfs file system. Is there any other way to do this than copying the file and deleting the original? There are _always_ alternative ways. With suffficient knowledge, oue could, for example, use 'dd' to copy the required two bytes to the appropriate position on the raw device holding the filesystem. This approach is, however, not likely to be at all 'reasonable' for the average user. The usual suspects like touch and mv do not work. yup. 'creation' timestamp is intended to be more-or-less immutable in the Unix world. And that 'viewpoint' carries over to other kinds of filesysems grafted onto a Unix host. From inside a 'custom' program, it's fairly readily doable, the system calls to do it, to exist. but, off-hand, I can't think of anything that makes it 'easy' for the average user to do it. Regards -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: change file creation time on msdosfs
In the last episode (Aug 27), Robert Bonomi said: From owner-freebsd-questi...@freebsd.org Thu Aug 26 14:33:04 2010 Date: Thu, 26 Aug 2010 21:06:04 +0200 From: Dominic Fandrey kamik...@bsdforen.de To: freebsd-questions@freebsd.org Subject: change file creation time on msdosfs I need to change the file creation time of some files on an msdosfs file system. Is there any other way to do this than copying the file and deleting the original? There are _always_ alternative ways. With suffficient knowledge, oue could, for example, use 'dd' to copy the required two bytes to the appropriate position on the raw device holding the filesystem. This approach is, however, not likely to be at all 'reasonable' for the average user. The usual suspects like touch and mv do not work. yup. 'creation' timestamp is intended to be more-or-less immutable in the Unix world. And that 'viewpoint' carries over to other kinds of filesysems grafted onto a Unix host. No; the utimes() syscall can be used to easily set the creation time (called birth time so it doesn't get confused with the ctime file metadata change time). More likely is that whoever added birthtime to ufs didn't bother updating the msdosfs code. If one of the other BSD's has implemented it, it should be relatively easy to import the changes. Otherwise you'll probably have to look at how birthtime is currently handled in ufs, and make it work in msdosfs. -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
change file creation time on msdosfs
I need to change the file creation time of some files on an msdosfs file system. Is there any other way to do this than copying the file and deleting the original? The usual suspects like touch and mv do not work. Regards -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: change file creation time on msdosfs
Hi Dominic, Did you tried ls -lu or ls -lc to check the time stamp? In some of the format, unix does not support getting those information. If you still want to try, using fsdb command, and modifying file system itself may work. Use mtime/ctime/atime built-in command whichever you want to change. [man of fsdb] http://pine.ict.nsc.ru/cgi-bin/www/unix_help/unix-man?fsdb+8 Sincerely, Isamu Onoda -- Isamu Onoda mail: onod...@gmail.com TEL: 080-3757-6465 IMPERARE SIBI MAXIMVM IMPERIVM EST 2010/8/27 Dominic Fandrey kamik...@bsdforen.de: I need to change the file creation time of some files on an msdosfs file system. Is there any other way to do this than copying the file and deleting the original? The usual suspects like touch and mv do not work. Regards -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org