help needed in fuser command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help needed in fuser command
# 1  
Old 02-20-2008
help needed in fuser command

Hi all,

I want to know if fuser command can be used to check if a file is being written or not???

Thanks In Advance
Anju
# 2  
Old 02-20-2008
I don't think if fuser can be used in this situation.
But you can use tail -f to see a growing file
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unable to get pid from fuser

bash-3.2$ fuser -f /bin/nohup.out /bin/nohup.out: 13136o 13111o The pid is 13136. Can you tell me how can i extract just the pid 13136 from the above output ? bash-3.2$ uname -a SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v I was trying on this lines but i get strange... (3 Replies)
Discussion started by: mohtashims
3 Replies

2. UNIX for Advanced & Expert Users

Fuser alternative OR running fuser on a script

Hi, Not sure whether there is a fuser alternative or any better way to check for file in use or not. I am wanting to check whether files are in use or not before removing them. Using fuser, the awk seems to be giving me 'weird' output not to mention that it is giving me 2 lines instead of... (0 Replies)
Discussion started by: newbie_01
0 Replies

3. Solaris

Difference between fuser and lsof command

Hi, Can anyone explain me the difference between fsuer and lsof commands. As per my knowledge both the commands are used to find the processes used by the current file system or user. Apart from that what is the major difference between these commands (3 Replies)
Discussion started by: rogerben
3 Replies

4. UNIX for Dummies Questions & Answers

fuser

if filename.txt is in used, exit, else continue. i tried to use fuser -c filename.txt, but returned bunch out PIDs eventhough filename.txt is not in used. any idea ? (10 Replies)
Discussion started by: tjmannonline
10 Replies

5. Solaris

FUSER problems

Greetings, I need help understanding why FUSER will not bring back PSID's on mounted filesystems. Is this a common error? Thanks in advance for your feedback. (11 Replies)
Discussion started by: Harleyrci
11 Replies

6. Shell Programming and Scripting

How to fetch PIDs from the fuser command output

All, I have to have my script wait for another script when it is being executed. I used fuser -f scriptname to get the PID of the script but when passed the PID to wait command, the command does not accept it as a PID. Below is the example: my.script1: fuser_result=`fuser -f my.script2`... (4 Replies)
Discussion started by: bharath.gct
4 Replies

7. UNIX for Dummies Questions & Answers

fuser

Anyone ever use fuser, i tried this command fuser /database.bk but it only returns datbase.bk: I read some of the forums online, one of them said when he used fuser, it broke down the box, i really don't want that happen. I thought fuser is to see who is accessing that file, right? any... (8 Replies)
Discussion started by: adrianlearnpro
8 Replies

8. UNIX for Advanced & Expert Users

STDOUT redirect to a FILE, when fuser command is used !!

Hi all, I have the following script: ------------------------------------------------- #SCRIPT TO CHECK WHO HAS ACCESSED THE LOG/FILE IN PAST 'N' MINUTES, AND MAIL ACCORDINGLY. MYPATH="/clocal/mqbrkrs/user/mqsiadm/sanjay/" MAIL_RECIPIENTS="vg517@dcx.com" Subject="File accessed in last... (6 Replies)
Discussion started by: varungupta
6 Replies

9. UNIX for Advanced & Expert Users

fuser ?? Look at the script !!

#SCRIPT TO CHECK WHO HAS ACCESSED THE LOG/FILE IN PAST 'N' MINUTES, AND MAIL ACCORDINGLY. MYPATH="/clocal/mqbrkrs/user/mqsiadm/sanjay/" MAIL_RECIPIENTS="abc@xyz.com" Subject="File accessed in last few minutes" >tempmail.txt >tempfind.txt find "$MYPATH" -type f -amin -1 > tempfind.txt cat... (0 Replies)
Discussion started by: varungupta
0 Replies

10. UNIX for Dummies Questions & Answers

Help with fuser

fuser is used to check whether a file is in use by a process or not. I was putting some information in a file via a background process and was doing a cat to see the contents. It gave me the pid of background process followed by stop. Understood only half, stopped because it was writing on it... (11 Replies)
Discussion started by: vibhor_agarwali
11 Replies
Login or Register to Ask a Question