My problem is with the find command. After looking through the forum I've got -
find . -mtime 2 -name "*"
which gives me a list of all the files modified in the last 2 days.
How do I change this to list files modified in the last 2 hours?
Sorry if this question is already on the forum... (4 Replies)
Last week I was using the command:
' find /directory -mtime -2 -print' and it showed all the files modified within that period. However, now it only displays the directories and not the files modified. The only thing that changed is that I was granted access to some files.
Thanks (2 Replies)
Hi ,
I am trying to find out the List of files modified or added aftter installation of any component on SUN solaris box .
But i am not able to do it using ls or find command .
Can somebody help me out ?
Thanks
Sanjay Gupta (2 Replies)
Hi All,
I have a requirement to find out the files which are modified in the last 10 minutes.
I tried the find command with -amin and -mmin options, but its not working on my AIX server.
Can anyone of you could help me.
Thanks in advance for your help.
Raju (3 Replies)
Hello :D
I am on the shell prompt in a directory, with couple of zip files in it.
How can I
unzip '*.zip' where modified time > 05:00
...please help
Regards
SunnyK (3 Replies)
Hi,
I have some log files created in the following fashion
Ex:
file name modified date
1) s.log1 01-jan-08
2) s.log2 02-jan-08
3) s.log3 03-jan-08
4) s.log4 04-jan-08
Now I want to have the latest 2 logs and delete the others.
Can you tell me the one liner /... (1 Reply)
Hi,
I am new bie to Unix. Might be a simple question I am asking.
I want to find the last modified time of a file and find the difference between the currrent time and the last modified time. Appreciate, if someone can throw some light on what commands can be used.
Cheers,
James (2 Replies)
Actually i did modification in a file on server by mistake, now its showing current time stamp, is there any way to set the files modified date and stamp to last modifies time.
Please advice here.Thanks in advance.:b: (7 Replies)
I have a huge list of files in an Unix directory (around 10000 files).
I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40
Can someone let me know what would be the fastest way... (10 Replies)
Version Info
+++++++++++++++
RHEL 5.4
Since ls command lists file sizes in Bytes which can be long I use du command like below.
I have run the du command for the below files as shown below.
But I want pipe this output to ls command just to see the modified timestamp for these files. ... (7 Replies)
Discussion started by: kraljic
7 Replies
LEARN ABOUT HPUX
gettimeofday
gettimeofday(2) System Calls Manual gettimeofday(2)NAME
gettimeofday - get the date and time
SYNOPSIS DESCRIPTION
The function obtains the current time, expressed as seconds and microseconds since Epoch, and stores it in the structure pointed to by tp.
The resolution of the system clock is one microsecond.
PARAMETERS
Programs should use this time zone information only in the absence of the environment variable.
tp A pointer to a structure in which the current time is returned.
The structure includes the following members:
tzp If this parameter is not a null pointer, it is interpreted as a pointer to a structure under HP-UX. The structure has the following
fields:
tz_minuteswest The number of minutes that the local time zone is west of Coordinated Universal Time (UTC) or Epoch.
tz_dsttime A flag that, if nonzero, indicates that Daylight Savings Time (DST) applies locally during the appropriate part of the
year.
RETURN VALUE
returns the following values under HP-UX:
Successful completion.
Failure.
is set to indicate the error.
ERRORS
If fails, is set to the following value under HP-UX:
[EFAULT] An argument address referenced invalid memory.
EXAMPLES
The following HP-UX example calls twice. It then computes the lapsed time between the calls in seconds and microseconds and stores the
result in a timeval structure:
WARNINGS
Relying on a granularity of one microsecond may result in code that is not portable to other platforms.
AUTHOR
was developed by the University of California, Berkeley, and HP.
SEE ALSO date(1), ftime(2), settimeofda(2), stime(2), time(2), ctime(3C).
gettimeofday(2)