Checking if any folder is opened or not?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Checking if any folder is opened or not?
# 8  
Old 09-10-2008
My OS version is:
HP-UX mars B.11.11 U 9000/800 2756520766 unlimited-user license
# 9  
Old 09-10-2008
Quote:
Originally Posted by vbe
What OS?

You may have to download the version for your OS... It is not native but open source (lsof that is...)
And fuser is normally in /usr/sbin (or /sbin..)
My OS is
HP-UX mars B.11.11 U 9000/800 2756520766 unlimited-user license
# 10  
Old 09-10-2008
ant:/home/vbe/scripts $ uname -rm
B.11.11 9000/800
ant:/home/vbe/scripts $ which lsof
/usr/contrib/bin/lsof
ant:/home/vbe/scripts $ swlist -l product|grep lsof
lsof 4.73 lsof
ant:/home/vbe/scripts $
last version and where I download:
Search Archive 2.0.0
# 11  
Old 09-10-2008
Quote:
Originally Posted by vbe
ant:/home/vbe/scripts $ uname -rm
B.11.11 9000/800
ant:/home/vbe/scripts $ which lsof
/usr/contrib/bin/lsof
ant:/home/vbe/scripts $ swlist -l product|grep lsof
lsof 4.73 lsof
ant:/home/vbe/scripts $
last version and where I download:
Search Archive 2.0.0

I downloaded this one...
but unable to open..

HP-UX
==========
[/home2/niroj_p]tar -tvf lsof-4.80-src-11.11.tar.tar
Error:directory checksum error

HP-UX 11.11
=========
[/home2/niroj_p]/usr/contrib/bin/gunzip lsof-4.80-hppa-11.11.depot.gz
gunzip: lsof-4.80-hppa-11.11.depot.gz: not in gzip format

Last edited by Niroj; 09-10-2008 at 10:18 AM..
# 12  
Old 09-10-2008
total 1617210
-rwxrwxrwx 1 vbe bin 105342 Sep 10 15:16 lsof-4.80-hppa-11.11.depot.gz
-rwxrwxrwx 1 vbe bin 26 Sep 10 15:09 lsof-4.80-hppa-11.11.depot.gz:Zone.Identifier
ant:/sm/export/hpux/11.11 $ gunzip lsof-4.80-hppa-11.11.depot.gz
ant:/sm/export/hpux/11.11 $ ll|grep lsof-4.8
-rwxrwxrwx 1 vbe bin 266240 Sep 10 15:16 lsof-4.80-hppa-11.11.depot
-rwxrwxrwx 1 vbe bin 26 Sep 10 15:09 lsof-4.80-hppa-11.11.depot.gz:Zone.Identifier

??
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Needed for creating the folder by checking today's date and, take backup using rsync command

How to create a shell script to create a folder by using the today's date to take backup using rsync command on every evening around 7 pm. Kindly help. Thanks. To be more precise, I want to create a script which matches the today's date with server's date format, if matches then creates the... (2 Replies)
Discussion started by: bakula10
2 Replies

2. Shell Programming and Scripting

Checking MD5 Hashes on a folder tree

Hi Guys, I have a backup program that creates incremental backups and generates a MD5 hash at the same time. Each server backup has its own sub folder. Each backup file has a corresponding .md5 file containing a hash and a file name like this. 3410efed13b087322de8036145230a55... (6 Replies)
Discussion started by: Pollardd
6 Replies

3. Shell Programming and Scripting

Checking of file exist in different folder

Hi All, Seeking for your assistance to compare if the file in working directory is found on the DIR2 directory and if not found move the file in DIR2. ex. WORKING_DIR=/home/dir1/ file1.txt DIR2=/home/admin/users file1.txt what i did was found_nonempty='' for file in... (4 Replies)
Discussion started by: znesotomayor
4 Replies

4. Shell Programming and Scripting

File exists, but cannot be opened.How to check- whether it could be opened to read when it exists

Hi #Testing for file existence if ; then echo 'SCHOOL data is available for processing' else echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING' : i wrote a script, where it begins by checking if file exists or not. If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies

5. UNIX for Dummies Questions & Answers

Script for checking the files in a folder

Hi , I am using the below script for checking for a file in a folder. if ; then echo 0 else echo 1 fi Is there any way we can check for files which are starting with GL*.csv.What I am trying to do is , I have to check in a folder for the GL*.csv files if there are any files they I... (6 Replies)
Discussion started by: wangkc
6 Replies

6. Shell Programming and Scripting

Checking files in folder using starting string for filename

Hi, How do i check if there are any files present in the folder with some specific starting string. For eg :- I have used this where Source_File is filename parameter. if then return 2 fi But in my case the source file name is not constant. The only constant thing is... (10 Replies)
Discussion started by: chetancrsp18
10 Replies

7. Web Development

Checking if a folder is empty or not using PHP

Hi, I am sharing this tip with you all.The codes given below will explain /** * Checking a folder is empty or not. * @param string $folderName * $folderName should be folder name or path * @return TRUE/FALSE (If any file or folder found/Empty folder) */ function... (1 Reply)
Discussion started by: elizas
1 Replies

8. Shell Programming and Scripting

The checking of folder existance is not working...

Hi all, I have the following code: if ; then echo 'folder not exist'; else echo 'folder exist'; fi The "testing" folder is not exist in /home/batch , but thhe result is 'folder exist'. It seems that the code cannot detect that the folder "testing" not exist. ANybody know the... (1 Reply)
Discussion started by: suigion
1 Replies

9. Shell Programming and Scripting

Continously checking folder and executing files

Hello All, I want to make a script which continously checks one folder all the time that is there is any file in it or not, and if it found any file in it than execute that file with the following command. apxrcv -text < filename > outputfile Actually my requirement is that i will put... (4 Replies)
Discussion started by: wakhan
4 Replies

10. UNIX for Dummies Questions & Answers

checking missing files in side a folder

Dear all, Every hour i am receiving several data files to one folder for 24 hours each day.But some times some hours i do not have the files because of some problem.So i want to check the files inside the folder at the end of the day wether how many files i received in each hour like this.so i... (4 Replies)
Discussion started by: Nayanajith
4 Replies
Login or Register to Ask a Question