06-28-2002
finding out the pid for a busy text file
Can some one please tell me how to find out the proccess ID that is holding up a file.
I am attempting to remove a file and I am getting a message stating that it is busy.
i.e
rm filename
filename: 777 mode ? (y/n) y
rm: filename not removed. Text file busy
Thanks in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that when run creates 4 other text files. Sometimes a couple of these text files are empty. So what I am trying to do is find out if there is text in the file and if not delete the file.
What I have so far is the following script. I am just not sure how to return a true value... (9 Replies)
Discussion started by: iCONAN
9 Replies
2. UNIX for Dummies Questions & Answers
How do i find text string in a file if i have no idea where the file is?
What I am trying to do is find an email address in a file and have no idea where the file is.
Thanks (5 Replies)
Discussion started by: §ynic
5 Replies
3. Shell Programming and Scripting
Hi, is there a command that takes the PID of a process and that only diplays it's ni number?
I`m pretty sure it would require pipes but I tried a few things that ended up miserably...
Since the ps command doesn't show the ni unless I do ps -o ni but then I can't find a way to search the right... (2 Replies)
Discussion started by: Yakuzan
2 Replies
4. Shell Programming and Scripting
Hi All,
Am copying mulitple files in a directory in names File0,File1,File2 etc.
I need to print separately the PID of these copies using File names.
for((i=0;i<5;i++))
do
mypid=`ps aux | awk '/File$i/ && !/awk/ { print $2 }'`
echo PID is $mypid
done
It printed nothing. Thinking... (6 Replies)
Discussion started by: amio
6 Replies
5. UNIX for Advanced & Expert Users
Hi,
We have a filesystem mystery on our hands. Given:
2 machines, A and Aa.
Machine Aa is the problem machine.
Machine A is running Ubuntu, kernel 2.6.22.9 #1 SMP Wed Feb 20 08:46:16 CST 2008 x86_64 GNU/Linux. Machine Aa is running RHEL5.3, kernel 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38... (2 Replies)
Discussion started by: mschwage
2 Replies
6. Solaris
Say I have 2 processes(perl scripts on Solaris machine) A and B.
the process A kill the process B.
While in the process B how do I print the PID of the process that Killed it(process A) before dieing.
My process A looks like
open(STATS, "ps -ef|");
while ($inputLine = <STATS>) {
if... (7 Replies)
Discussion started by: enigma_007
7 Replies
7. Solaris
Hi Experts,
I was asked to find most busy file system on one of the server. It is Sun 10. Any idea to get this?
Thanks,
Deepak (5 Replies)
Discussion started by: naw_deepak
5 Replies
8. Shell Programming and Scripting
Hello,
Please help me with this.
I have two files. file1.txt and file2.txt
File1 contains text as below
txt1 txt2
txt3 txt4
txt5 txt6
txt7 txt8
File2 contains text as below
$1 $2 $3 $4 $5 $6 $7 $8 $9
-----------------------------
txt1 txt2 - - - 0 2 8 -*-
txt0 txt7 - - - 1 4 8... (3 Replies)
Discussion started by: tenderfoot
3 Replies
9. Shell Programming and Scripting
Hello All,
I am facing difficulty in getting the PID value & then assigning it to a variable,
kindly help me in resolving the issue.
Thanks a lot in advance.
The custom utility used inside the Test2.sh will process the file in a batch of 10 lines at once and for efficient memory management,... (3 Replies)
Discussion started by: duddukuri
3 Replies
10. Shell Programming and Scripting
Hello All,
I need to run a set of scripts, say 50 of them, parallely. I'm running these 50 scripts, from inside a script with the help of 'nohup' command.
1.The fifty scripts are stored in a separate file.
2.In a master script, i'm reading every line of the file through loop and executing... (4 Replies)
Discussion started by: SriRamKrish
4 Replies
LEARN ABOUT DEBIAN
asntool
ASNTOOL(1) NCBI Tools User's Manual ASNTOOL(1)
NAME
asntool - process ASN.1 module specifications
SYNOPSIS
asntool [-] [-B filename] [-D N] [-G] [-I str] [-J type] [-K str] [-L str] [-M filename,...] [-P str] [-Q] [-S filename] [-T filename] [-V]
[-X filename] [-Z] [-b N] [-d filename] [-e filename] [-f filename] [-l filename] -m filename [-o filename] [-p filename] [-t str]
[-v filename] [-w N] [-x filename]
DESCRIPTION
asntool reads, validates, and displays ASN.1 module specifications.
OPTIONS
A summary of options is included below.
- Print usage message
-B filename
Generate objects and code in files named filename.*
-D N Debugging level for code generation:
0 No debugging (default)
1 Shallow debugging
2 Deep debugging
3-9 Same as 2
-G Generate object loader .c and .h files
-I str Put "#include str" in generated .c file
-J type
Register type type with object manager
-K str In generated .c, force name of #included asn header to str
-L str Label registered type as str
-M filename,...
Search the ASN.1 modules in filename,... for external references
-P str XML module prefix for DOCTYPE
-Q Use quoted syntax form for generated include files
-S filename
Send debugging output to filename rather than stderr
-T filename
Dump ASN.1 tree to filename
-V Force CHOICE objects to use custom structures rather than ValNodePtrs, for compatibility with some old hand-coded object loaders.
-X filename
Write XML DTD to filename. If filename is "m", print each module to a separate file.
-Z Bit twiddle for optional zero value base slots
-b N Use N-byte buffers (default = 1024; anything between 512 and 10000 is legal)
-d filename
Read binary values from filename (requires -t)
-e filename
Write binary values to filename
-f filename
Write ASN.1 module to filename
-l filename
Write ASN.1 loader to filename
-m filename
Read ASN.1 module from filename
-o filename
Write header to filename
-p filename
Write print values to filename
-t str Expect binary values to have type str
-v filename
Read print values from filename
-w N Limit values in #defines to N bits (default = 31; anything between 31 and 128 is legal)
-x filename
Write XML data to filename
AUTHOR
The National Center for Biotechnology Information.
NCBI
2010-09-01 ASNTOOL(1)