1844066 Members
2679 Online
110227 Solutions
New Discussion

file creation

 
Indrajit Bhagat
Regular Advisor

file creation

how to find out all the files that are created today ?
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: file creation

Hi:

Unix has no such attribute as a "creation" timestamp. The closest you can come is a modification ('mtime'). When a file or directory is first created, the 'mtime' is what you would call a creation time. Thereafter, any modification (other than permission, name, or ownership change constitues a change in 'mtime'.

To find all files modified after midnight today, do:

# touch -amt 01270000 /tmp/myref
# find / -type f -newer /tmp/myref -print

See the manpages for 'touch' and 'find'. See the manpages for 'stat(2)' for more information on 'mtime'.

Regards!

...JRF...
Arturo Galbiati
Esteemed Contributor

Re: file creation

Hi,
I use this alias on HP-UX11i:
llt='ls -l|grep "$(date +%b" "%e)"'
HTH,
Art