Check weather a file is in use or not?


 
Thread Tools Search this Thread
Operating Systems Linux Check weather a file is in use or not?
# 1  
Old 02-03-2009
Error Check weather a file is in use or not?

Hi,
Hi want to check weather a file is being used by using a command or java code or shell script.
So, can any body give me some idea..

Thanks
Buddhika
# 2  
Old 02-03-2009
Can try it with lsof.
# 3  
Old 02-03-2009
Hi,
I tried to execute "lsof". System says that command not found. I'm using a redhat linux system.
Is this a genaral command?

Thanks
Buddhika
# 4  
Old 02-03-2009
run as root or a uid 0 user.

run the command "updatedb"

then type "locate lsof" it may not be installed. Another option is fuser. run the man on that command
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Looking for a return value weather smartctl is running a (short) selftest or not

Hey guys, I'm kinda stuck here.. I'm trying to write a script, which should start a short selftest via smartctl, for example smartctl -t short /dev/sda and after the test is finished I want it to write the new smartvalues in a logfile. well... Now I need a return value for wether the... (1 Reply)
Discussion started by: phill971
1 Replies

2. Shell Programming and Scripting

Use PYTHON to collect data weather and print in new file

Hi all, i have a task to do with Python and because i'm a beginner on it i would like your help on this. Create a python script that: Every hour collect the Temperature (e.g. 29C) and Current Condition (e.g. Clear) from this website wunderground.com/global/stations/54511.html Create a CSV... (0 Replies)
Discussion started by: ragaga123
0 Replies

3. Shell Programming and Scripting

Shell script for weather / forecast

#!/bin/sh #Argentina Only :s # This script requires curl and iconv, iconv is because they do not use Weather Service utf-8 ¬¬ # 87938 = Ushuaia # 87934 = Rio Grande # 87418 = Mendoza # 87582 = Capital Federal # 87692 = Mar del Plata # 87480 = Rosario # 87344 = Cordoba # 87371 = Santa Fe ... (8 Replies)
Discussion started by: yamirokuay
8 Replies

4. Shell Programming and Scripting

How to check weather a string is like test* or test* ot *test* in if condition

How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies

5. Shell Programming and Scripting

Geo Weather Challenge

Hi everybody, I'm new to these forums and this is my first post. A couple days ago I was trying to find a simple script that would return an individual's local weather conditions using I.P. based geolocation. After many failed search attempts, I began my quest to create this for myself. I have to... (0 Replies)
Discussion started by: o0110o
0 Replies

6. Shell Programming and Scripting

save weather radar to local time-named file every 15 minutes

I think I can do this myself now, but I am always amazed by how people can do things cleaner and simpler than I end up doing... Using cron, I want to save the image found at: http://radar.weather.gov/ridge/Conus/RadarImg/centgrtlakes.gif every 15 minutes to a local file , such as ... (1 Reply)
Discussion started by: brucewestfall
1 Replies

7. UNIX for Dummies Questions & Answers

How to verify weather it is a ebcdic file or not

Hi all, Please tell me how to verify weather it is a ebcdic file or not . I checked with file commond but it is giving like International Language text. Regards, Chaitu (0 Replies)
Discussion started by: c_chaitanya
0 Replies

8. Shell Programming and Scripting

how to check weather file is blank or not?

Dear All I want to do following task. Kindly suggest. In my script every hour one file is genarated. say xyz.txt. Now if this file contain some data then i want to do task A and if file is blank then i want to do nothing. Kindly help me to do this. regards jaydeep (5 Replies)
Discussion started by: jaydeep_sadaria
5 Replies
Login or Register to Ask a Question