Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

list the files

Super Advisor

list the files

i want to print last one hour not updated file list in hp-ux 11.31 & hp-ux 11.11 , pls share the command

Patrick Wallek
Honored Contributor

Re: list the files

You first have to create a reference file that has a time stamp of 1 hour in the past. 


For example, my current time as 17:42 EDT, so I need to create a reference file with a time stamp of 16:42 EDT:


# touch -t 10091642 afile

# ll afile
-rw-r--r-- 1 root sys 875 Oct 9 16:42 afile


Now I can find all files newer than that file:


# find . -newer afile -exec ll -d {} +
drwxr-xr-x 28 root sys 8192 Oct 9 17:41 .
-rw------- 1 root sys 499 Oct 9 17:41 ./.Xauthority
-rwx------ 1 root sys 9088 Oct 9 17:44 ./.sh_history


If you want files that are NOT newer than 1 hour old, then do:


# find . ! -newer afile -exec ll -d {} +