Retrieving file size, or its modification time
Hi all,
I am beginner in bash programming and I am trying to write a script thet retrieves and stores inside some of its local variables a modification time ( or a size ) of a given file. Are there any syscalls, or other methods to achieve above written ? Thank you. |
"stat -c "%s %Y" /some/file" will give you the size in bytes and mtime in epoch.
|
try
byTime=`ls -l [files] | awk '{ print $6:$7 }' bySize=`ls -l [files] | awk '{ print $5:$7 }' |
thanks
Thanks for help !
|
All times are GMT -5. The time now is 10:05 PM. |