Re: getfiletime() and setfiletime()
On Sat, Apr 22, 2006 at 12:56:16AM -0500, Dan Nelson wrote: > In the last episode (Apr 21), Gary Kline said: > > > You can use mtree to do this. > > > > How, exactly? In ~/Mail are scores of files dating from 1991; for > > the most part this Content-Type = "text/html" for rough example only > > began in the late 90's. But there are scads of them. I'm looking at > > pulling some of the guts from cp (copy -p that preserves the > > time-stamp [and more]). If mtree is an easier route, then great. > > How would I run this file > > > > -rw--- 1 kline wheel306870 Dec 22 2004 ebay.com > > > > thru my filter and have wind up with its original timestamp. > > $ mtree -c -k time -p ~/Mail > mail.times > > $ run filter > > $ mtree -U -p ~/Mail < mail.times > Yup; your trick does it all; thankee!! -- Gary Kline [EMAIL PROTECTED] www.thought.org Public service Unix ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: getfiletime() and setfiletime()
In the last episode (Apr 21), Gary Kline said: > On Fri, Apr 21, 2006 at 10:12:04PM -0500, Dan Nelson wrote: > > In the last episode (Apr 21), Gary Kline said: > > > With all the billions-and-billions of lines of C hacked by people > > > reading this, do any of you have the functions that would get and > > > save-away the stat mtime, then be able to set the original mtime > > > of the file to what it was? > > > > > > I am getting back to working on a programm that cleans away > > > embedded html, jpg, and other non ASCII (or 8859-1) and leaves > > > just-plain-text. This from my ~/Mail/* files. Ideally, I would > > > like to set the timestamp of each file to what it was. So before > > > I re-invent wheels, I thought I'd ask the list. > > > > You can use mtree to do this. > > How, exactly? In ~/Mail are scores of files dating from 1991; for > the most part this Content-Type = "text/html" for rough example only > began in the late 90's. But there are scads of them. I'm looking at > pulling some of the guts from cp (copy -p that preserves the > time-stamp [and more]). If mtree is an easier route, then great. > How would I run this file > > -rw--- 1 kline wheel306870 Dec 22 2004 ebay.com > > thru my filter and have wind up with its original timestamp. $ mtree -c -k time -p ~/Mail > mail.times $ run filter $ mtree -U -p ~/Mail < mail.times -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: getfiletime() and setfiletime()
On Fri, Apr 21, 2006 at 10:12:04PM -0500, Dan Nelson wrote: > In the last episode (Apr 21), Gary Kline said: > > With all the billions-and-billions of lines of C hacked by > > people reading this, do any of you have the functions that > > would get and save-away the stat mtime, then be able to set the > > original mtime of the file to what it was? > > > > I am getting back to working on a programm that cleans away > > embedded html, jpg, and other non ASCII (or 8859-1) and leaves > > just-plain-text. This from my ~/Mail/* files. Ideally, I > > would like to set the timestamp of each file to what it was. So > > before I re-invent wheels, I thought I'd ask the list. > > You can use mtree to do this. > How, exactly? In ~/Mail are scores of files dating from 1991; for the most part this Content-Type = "text/html" for rough example only began in the late 90's. But there are scads of them. I'm looking at pulling some of the guts from cp (copy -p that preserves the time-stamp [and more]). If mtree is an easier route, then great. How would I run this file -rw--- 1 kline wheel306870 Dec 22 2004 ebay.com thru my filter and have wind up with its original timestamp. gary PS: I'm prob'ly making this more complicated than need be -- Gary Kline [EMAIL PROTECTED] www.thought.org Public service Unix ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: getfiletime() and setfiletime()
In the last episode (Apr 21), Gary Kline said: > With all the billions-and-billions of lines of C hacked by > people reading this, do any of you have the functions that > would get and save-away the stat mtime, then be able to set the > original mtime of the file to what it was? > > I am getting back to working on a programm that cleans away > embedded html, jpg, and other non ASCII (or 8859-1) and leaves > just-plain-text. This from my ~/Mail/* files. Ideally, I > would like to set the timestamp of each file to what it was. So > before I re-invent wheels, I thought I'd ask the list. You can use mtree to do this. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"