08-21-2002
lsof
LSOF is a good way to tell if the file is being accessed.
Here is a link I got from a google search.
http://ftp.cerias.purdue.edu/pub/too.../hpux/B.11.11/
From the man page:
Instead of a formatted display, lsof will produce output that can be
parsed by other programs. See the -F, option description, and the
OUTPUT FOR OTHER PROGRAMS section for more information.
In addition to producing a single output list, lsof will run in repeat
mode. In repeat mode it will produce output, delay, then repeat the
output operation until stopped with an interrupt or quit signal.
Hope this helps.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how can I use 'ls' to list file which is accessed yesterday? Thx :confused: (2 Replies)
Discussion started by: aaron_fong
2 Replies
2. Shell Programming and Scripting
Hello all
im trying to make daemon that listen for incoming textiles
and then it will move them to defined directory now the daemon part is ok
but im stack on how to check of file is close and done copied to directory .
so i could process it and move it forward
tnx (13 Replies)
Discussion started by: umen
13 Replies
3. Shell Programming and Scripting
when unix is logged in it access some login file depending on the shell
like .cshrc , .login , .vimrc , .bashrc
how can we know which is being access in a perticular unix flavor. (1 Reply)
Discussion started by: useless79
1 Replies
4. Shell Programming and Scripting
Hi all,
I will thankful if anybody helps me in finding out the users who accessed any of our files.
Thanks in advance
Chanakya (2 Replies)
Discussion started by: Chanakya.m
2 Replies
5. AIX
Hey,
I want to ask a simple Question....
How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (1 Reply)
Discussion started by: varungupta
1 Replies
6. Shell Programming and Scripting
Hey,
I want to ask a simple Question....
How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (16 Replies)
Discussion started by: varungupta
16 Replies
7. Shell Programming and Scripting
Hello, is there maybe a way to check if a specific file is being accessed at the moment?
Example:
You will start copying a 10 GB file from A to B, how could I code it so my script actually knows when file B is finished copying? (1 Reply)
Discussion started by: TehOne
1 Replies
8. UNIX for Advanced & Expert Users
Advance Thanks.
(1) I would like to know any unix/Linux command to check EOF char in a file.
(2) Or Any way I can check a file has been reached completely at machine B from machine A. Note that machine A ftp/scp the file to machine B at unknown time. (5 Replies)
Discussion started by: alexalex1
5 Replies
9. UNIX for Advanced & Expert Users
Hi All,
is there any command or script to find out last five users who have accessed a file
thanks
jcpratap (1 Reply)
Discussion started by: Jcpratap
1 Replies
10. UNIX for Dummies Questions & Answers
I can do an ls -l CD* and see the following CDTEST userA RW RW R and I an logged on as userA. But if I do an ls -l the file does not appear. If I do a vi CDTEST it tries to create a new file named CDTEST. If I do a mv or rm I get the message no file of name CDTEST found. Any idea what is going on.... (3 Replies)
Discussion started by: LeeT
3 Replies
LEARN ABOUT OSX
shasum5.12
SHASUM(1) Perl Programmers Reference Guide SHASUM(1)
NAME
shasum - Print or Check SHA Checksums
SYNOPSIS
Usage: shasum [OPTION] [FILE]...
or: shasum [OPTION] --check [FILE]
Print or check SHA checksums.
With no FILE, or when FILE is -, read standard input.
-a, --algorithm 1 (default), 224, 256, 384, 512
-b, --binary read files in binary mode (default on DOS/Windows)
-c, --check check SHA sums against given list
-p, --portable read files in portable mode
produces same digest on Windows/Unix/Mac
-t, --text read files in text mode (default)
The following two options are useful only when verifying checksums:
-s, --status don't output anything, status code shows success
-w, --warn warn about improperly formatted SHA checksum lines
-h, --help display this help and exit
-v, --version output version information and exit
The sums are computed as described in FIPS PUB 180-2. When checking,
the input should be a former output of this program. The default mode
is to print a line with checksum, a character indicating type (`*'
for binary, `?' for portable, ` ' for text), and name for each FILE.
DESCRIPTION
The shasum script provides the easiest and most convenient way to compute SHA message digests. Rather than writing a program, the user
simply feeds data to the script via the command line, and waits for the results to be printed on standard output. Data can be fed to
shasum through files, standard input, or both.
The following command shows how easy it is to compute digests for typical inputs such as the NIST test vector "abc":
perl -e "print qw(abc)" | shasum
Or, if you want to use SHA-256 instead of the default SHA-1, simply say:
perl -e "print qw(abc)" | shasum -a 256
Since shasum uses the same interface employed by the familiar sha1sum program (and its somewhat outmoded anscestor md5sum), you can install
this script as a convenient drop-in replacement.
AUTHOR
Copyright (c) 2003-2008 Mark Shelor <mshelor@cpan.org>.
SEE ALSO
shasum is implemented using the Perl module Digest::SHA or Digest::SHA::PurePerl.
perl v5.12.5 2013-08-25 SHASUM(1)