change the file date and time

Bill Campbell freebsd at celestial.com
Fri Jun 6 20:56:50 UTC 2008


On Fri, Jun 06, 2008, Georgi Tyuliev wrote:
>Dear Sirs
>1. How to mount Sony Ericsson k750i mobile phone with FreeBSD 7.0 ?
>2. How to change automatically the file attributes (for example 'date') 
>of large number of files?
>For example: I have taken many photos with my Sony Ericsson k750i mobile 
>phone and
>the exact time end date is accessible (e.g. through F3 of the midnight 
>commander),
>but very often when copying the jpg's the file attributes change.

man utime
man touch

You can set the access and modification times of any file or
directory directly with the utime(2) system call.  This can be
done from scripting languages such as python or perl, without
having to write C programs.

The ``touch'' command can change the modification times from any
shell program, which may be all you need.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

Intaxication: Euphoria at getting a refund from the IRS, which lasts until
you realize it was your money to start with.


More information about the freebsd-questions mailing list