03-21-2009
Hi all,,,,
when i try using the find command with -mtime -1 i get the files for the 24hrs from the current time.
I am not getting it on an hourly basis.
can u please suggest on this.
My requirement is to get files for the past 2 hrs from the current time from a directory....
thanks in advance ..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hello! is there a way for me to use the chmod command to change permissions for several files all at once -based on the fact that these files were all most recently modified TODAY ?
I can't use a wildcard on their filenames because the filenames are varied. But I was hoping I could somehow do... (2 Replies)
Discussion started by: polka_friend
2 Replies
2. Shell Programming and Scripting
Hi what is the most optimum way to ftp the most recently modified file starting with a particular string.
i tried this
ftp -n 2>logfile 1>&2 <<EOF
open xxxxxx
user xxxx xxxx
prompt
ls -ltr f* res
!var=`tail -1 |awk { print $9 }'`
bye
EOF
that gives... (6 Replies)
Discussion started by: ahmedwaseem2000
6 Replies
3. Solaris
Hi all,
i want to know which file is updated after changes the modifications/new entries in crontab.
Please help regarding this.
regards
Krishna (1 Reply)
Discussion started by: krishna176
1 Replies
4. UNIX for Dummies Questions & Answers
How do I find files those have been updated in the last 24 hours, sort them by size descending and then display the top of the long list? (6 Replies)
Discussion started by: shantanuo
6 Replies
5. Shell Programming and Scripting
Is there a shell command that will allow me to list index files in the /home directory for all users on a server that have been updated within the past 24 hours?
(e.g. index.htm .html .php in/home/user1/public_html /home/user2/public_html /home/user3/public_html etc ) (2 Replies)
Discussion started by: Kain
2 Replies
6. UNIX for Dummies Questions & Answers
How do I do it? Simple answers preferred... using BASH.. the less code the better.
I want to find out where Indesign is caching PDF tmp data ... I figure this is a good way to do it.. either way i wanna know how to do it. (2 Replies)
Discussion started by: glev2005
2 Replies
7. Shell Programming and Scripting
Good evening everybody,
I have to find the user owner of the most recently file in the system
How can I do? :confused: (5 Replies)
Discussion started by: Guccio
5 Replies
8. UNIX for Advanced & Expert Users
I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies
9. Shell Programming and Scripting
Hi,
I am looking for a command to search for a specific file which was recently modified in the current directory leaving some unwanted files to be listed.
For example, when I try ls - lrt
it shows the following output.
I want to ommit the files with the name 'resend' and... (3 Replies)
Discussion started by: svajhala
3 Replies
10. UNIX for Dummies Questions & Answers
Hi all, I am a bit of a beginner with shell scripting..
What I want to do is merge two drives, for example moving all data from X to Y.
If a file in X doesn't exist in Y, it will be moved there.
If a file in X also exists in Y, the most recently modified file will be moved to (or kept) in... (5 Replies)
Discussion started by: apocolapse
5 Replies
STAT(5) File Formats Manual STAT(5)
NAME
stat, wstat - inquire or change file attributes
SYNOPSIS
Tstat tag[2] fid[2]
Rstat tag[2] fid[2] stat[116]
Twstat tag[2] fid[2] stat[116]
Rwstat tag[2] fid[2]
DESCRIPTION
The stat transaction inquires about the file identified by fid. The reply will contain a 116-byte (DIRLEN in <libc.h>) machine-independent
directory entry laid out as follows:
name[28] file name; must be / if the file is the root directory of the server
uid[28] owner name
gid[28] group name
qid.path[4] the file server's identification for the file
qid.vers[4] version number for given path
mode[4] permissions and flags
atime[4] last access time
mtime[4] last modification time
length[8] length of file in bytes
type[2] for kernel use
dev[2] for kernel use
Integers in this encoding are in little-endian order (least significant byte first). The convM2D and convD2M routines (see fcall(2)) con-
vert between directory entries and C structs.
This encoding may be turned into a machine dependent Dir structure (see stat(2)) using routines defined in fcall(2).
The mode contains permission bits as described in intro(5) and the following: 0x80000000 (this file is a directory), 0x40000000 (append
only), 0x20000000 (exclusive use). Writes to append-only files always place their data at the end of the file; the offset in the read or
write message is ignored, as is the OTRUNC bit in an open. Exclusive use files may be open for I/O by only one fid at a time across all
clients of the server. If a second open is attempted, it draws an error. Servers may implement a timeout on the lock on an exclusive use
file: if the fid holding the file open has been unused for an extended period (of order at least minutes), it is reasonable to break the
lock and deny the initial fid further I/O.
The two time fields are measured in seconds since the epoch (Jan 1 00:00 1970 GMT). The mtime field reflects the time of the last change
of content. For a plain file, mtime is the time of the most recent create, open with truncation, or write; for a directory it is the time
of the most recent remove, create, or wstat of a file in the directory. Similarly, the atime field records the last read of the contents;
also it is set whenever mtime is set. In addition, for a directory, it is set by an attach, walk, or create, all whether successful or
not.
The length records the number of bytes in the file. Directories and most files representing devices have a conventional length of 0.
The stat request requires no special permissions.
The wstat request can change some of the file status information. The name can be changed by anyone with write permission in the parent
directory; it is an error to change the name to that of an existing file. The mode and mtime can be changed by the owner of the file or
the group leader of the file's current group. The directory bit cannot be changed by a wstat; the other defined permission and mode bits
can. The gid can be changed: by the owner if also a member of the new group; or by the group leader of the file's current group if also
leader of the new group (see intro(5) for more information about permissions and users(6) for users and groups). None of the other data
can be altered by a wstat. In particular, there is no way to change the owner of a file.
A read of a directory yields an integral number of directory entries in the machine independent encoding given above (see read(5)).
ENTRY POINTS
Stat messages are generated by fstat and stat.
Wstat messages are generated by fwstat and wstat.
STAT(5)