Sponsored Content
Full Discussion: Unix Internal Question
Top Forums UNIX for Advanced & Expert Users Unix Internal Question Post 302188717 by marlonus999 on Thursday 24th of April 2008 05:31:37 AM
Old 04-24-2008
Great! I was able to monitor file openings of this file via "fuser -f /usr/var/sample.exe". Actually "fuser -fu" does the trick also, but I wanted to know the exact process accessing the file, so I cooked up a short script below. BTW, the OS is HP 11.11

Code snippet:

- - -
#!/bin/ksh

while [ true ]
do
line=`fuser -f /usr/var/sample.exe 2>/dev/null`
if [[ -n $line ]]
then
echo
prc=`echo $line | sed 's/o//g'`

for i in `echo $prc`
do
ps -efxx |grep $i |grep -v "grep"
done

fi
sleep 1
done

- - -

Thanks Jim M. !
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how internal modem on pc

Would anyone know how to mount an internal modem on Solaris on PC? (7 Replies)
Discussion started by: softarch
7 Replies

2. IP Networking

unix to unix serial connection question

hi there i'm a new bie just got few simple questions to ask. I got expert in windows configuration but totally new to unix environment . I want to make sure a com port (com1) is working, so I connect a 9-pin cable (CB9) for both PC using Unix environment (unix to unix). The question are (1)... (1 Reply)
Discussion started by: typsam
1 Replies

3. UNIX for Advanced & Expert Users

internal security

We have about 300 users in the systeme , they mainly use the software called "netterm" to telnet our RH server to access the db in our internal network , I know there are some secure program like ssh , that is more secure for connection , do you think it is good idea to replace the software in our... (2 Replies)
Discussion started by: ust
2 Replies

4. UNIX for Dummies Questions & Answers

Unix History Question: Why are filenames/dirnames case sentsitive in Unix?

I tried looking for the answer online and came up with only a few semi-answers as to why file and directory names are case sensitive in Unix. Right off the bat, I'll say this doesn't bother me. But I run into tons of Windows and OpenVMS admins in my day job who go batty when they have to deal... (3 Replies)
Discussion started by: deckard
3 Replies

5. Programming

Unix Internal

What is Unix Internals on a Layman's Language.Can I consider Unix Internal expert for a Unix's Position? Thanks (3 Replies)
Discussion started by: Rengi
3 Replies

6. UNIX for Advanced & Expert Users

Forwarding internal internet packets to internal webserver using iptables

Hi, I need to redirect internal internet requests to a auth client site siting on the gateway. Currently users that are authenticated to access the internet have there mac address listed in the FORWARD chain. All other users need to be redirected to a internal site for authentication. Can... (1 Reply)
Discussion started by: mshindo
1 Replies

7. AIX

Internal error

Dear experts, please inform when i am trying to use dbx to debug my code, iam getting following error: internal error: expected member attribute 's', 'p', 'r' or 'b', found... (1 Reply)
Discussion started by: vin_pll
1 Replies

8. Filesystems, Disks and Memory

internal disk and external disk question

Hello, We are running sun solaris and it is connected to SAN storage. How do I find what are the disks are internal and what are the disks are connected to SAN? (0 Replies)
Discussion started by: mokkan
0 Replies

9. Shell Programming and Scripting

for loop with internal unix command in statement throwing error

Hi I've gotten a plugin script that won't run. I keeps throwing an error at the following line. for BARCODE_LINE in `cat ${TSP_FILEPATH_BARCODE_TXT} | grep "^barcode"` do #something done The error reads ... (3 Replies)
Discussion started by: jdilts
3 Replies

10. Homework & Coursework Questions

UNIX internal Algorithms

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Unix internal algorithms like namei() 2. Relevant commands, code, scripts, algorithms: System... (1 Reply)
Discussion started by: Phaneendra G
1 Replies
ARCHIVE(8)                                                    System Manager's Manual                                                   ARCHIVE(8)

NAME
archive - Usenet article archiver SYNOPSIS
archive [ -a archive ] [ -f ] [ -i index ] [ -m ] [ -r ] [ input ] DESCRIPTION
Archive makes copies of files specified on its standard input. It is normally run either as a channel feed under innd(8), or by a script before expire(8) is run. Archive reads the named input file, or standard input if no file is given. The input is taken as a set of lines. Blank lines and lines starting with a number sign (``#'') are ignored. All other lines should specify the name of a file to archive. If a filename is not an absolute pathname, it is taken to be relative to /var/spool/news. Files are copied to a directory within the archive directory, /var/spool/news/news.archive. The default is to create a hierarchy that mim- ics the input files; intermediate directories will be created as needed. For example, the input file comp/sources/unix/2211 (article 2211 in the newsgroup comp.sources.unix) will be copied to /var/spool/news/news.archive/comp/sources/unix/2211. OPTIONS
-a archive If the ``-a'' flag is used then its argument specifies the directory to archive in instead of the default. -f If the ``-f'' flag is used, then all directory names will be flattened out, replacing the slashes with periods. In this case, the file would be copied to /var/spool/news/news.archive/comp.sources.unix/2211. -i If the ``-i'' flag is used, then archive will append one line to the specified index file for each article that it copies. This line will contain the destination name and the Message-ID and Subject headers. -m Files are copied by making a link. If that fails a new file is created. If the ``-m'' flag is used, then the file will be copied to the destination, and the input file will be replaced with a symbolic link pointing to the new file. -r By default, archive sets its standard error to /var/log/news/errlog. To suppress this redirection, use the ``-r'' flag. EXIT STATUS
If the input is exhausted, archive will exit with a zero status. If an I/O error occures, it will try to spool its input, copying it to a file. If there was no input filename, the standard input will be copied to /var/spool/news/out.going/archive and the program will exit. If an input filename was given, a temporary file named input.bch (if input is an absolute pathname) or /var/spool/news/out.going/input.bch (if the filename does not begin with a slash) is created. Once the input is copied, archive will try to rename this temporary file to be the name of the input file, and then exit. EXAMPLES
A typical newsfeeds(5) entry to archive most source newsgroups is as follows: source-archive :!*,*sources*,!*wanted*,!*.d :Tc,Wn :/usr/lib/news/bin/archive -f -i /usr/spool/news/news.archive/INDEX HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.14, dated 1996/10/29. SEE ALSO
newsfeeds(5). ARCHIVE(8)
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy