Visit Our UNIX and Linux User Community


How do we know which processis creating a datafile


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How do we know which processis creating a datafile
# 1  
Old 09-07-2008
How do we know which processis creating a datafile

Hi,

Is there any way we can find out which process is creating a partucular datafile.I know the user and group but i am just curios to know is there any way to find the process.

Thanks
# 2  
Old 09-07-2008
You can try lsof command. But the command is only available in few flavours of unix.
# 3  
Old 09-07-2008
Quote:
Originally Posted by dennis.jacob
You can try lsof command. But the command is only available in few flavours of unix.
I guess you can try fuser -u filename as well.

May be better/other options may be available with the masters hereSmilie
# 4  
Old 09-07-2008
Which OS are you running?

lsof is available for any unix, just gotta download it, but that will only tell you if a currently running process has an open handle to your file.

If the process is finished and you are trying to find what created the file, you'd have to go to audit logs. If you have enabled system call auditing you can track back to a process id and from there identify what created that process but that's pretty painful.

If the process is still running, even without lsof it's pretty easy to locate, but exact method depends on the OS.

With lsof, just run:
Code:
lsof <filename>

# 5  
Old 09-08-2008
AIX unix

I used lsof <filename>.i am getting the following warning.
lsof: WARNING: access /home/user/.lsof_etlp8001: No such file or directory
lsof: WARNING: created device cache file: /home/user/.lsof_etlp8001
If i open the above file i am getting so much information like below

3 sections, dev=8000000a00000004
device section: 460
8000000100000000 2008 /dev/tty
8000000200000000 278 /dev/mem
8000000200000001 277 /dev/kmem
8000000200000002 279 /dev/null
8000000200000003 308 /dev/zero
8000000200000004 281 /dev/pmem
8000000300000000 280 /dev/nvram
8000000400000000 260 /dev/console
8000000500000000 2602 /dev/systrace
8000000500000001 2603 /dev/systrctl
8000000600000000 261 /dev/error
8000000600000001 262 /dev/errorctl
8000000700000000 298 /dev/sysdump
8000000700000001 299 /dev/sysdumpctl
8000000700000002 301 /dev/sysdumpnull
8000000700000003 300 /dev/sysdumpfile
8000000800000000 258 /dev/audit
8000000a00000000 257 /dev/__vg10
8000000a00000000 295 /dev/rootvg
8000000a00000000 2009 /dev/IPL_rootvg
8000000a00000001 220 /dev/ipl_blv
8000000a00000002 221 /dev/rhd6
8000000a00000003 288 /dev/rhd8
8000000a00000004 10 /dev/rhd4
8000000a00000005 286 /dev/rhd2
8000000a00000006 289 /dev/rhd9var
8000000a00000007 287 /dev/rhd3
8000000a00000008 284 /dev/rhd1
8000000a00000009 285 /dev/rhd10opt
8000000a0000000a 2206 /dev/rperflv
8000000a0000000b 2209 /dev/rlg_dumplv
8000000a0000000c 2231 /dev/rpaging00
8000000a0000000d 2517 /dev/rpaging01
8000000a0000000e 2608 /dev/ritmlv
8000000a0000000f 2616 /dev/rcorelv
8000000b00000000 302 /dev/vio0
8000000c00000000 259 /dev/clone
# 6  
Old 09-08-2008
please help me:
how can we find which process create which file or
how can find that file_name1 created by which process.
# 7  
Old 09-08-2008
Is this continuation of the previous post ? ( I don't think so. )
If not, this should be as a new thread Smilie

Previous Thread | Next Thread
Test Your Knowledge in Computers #866
Difficulty: Easy
Lisp and Fortran are the two oldest high-level programming language still in widespread use today.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read in numbers from a datafile

Hi, I want to be able to read numbers from many files which have the same general form as follows: C3H8 4.032258004031807E-002 Phi = 1.000000E+00 Tau = 5.749E+00 sL0 = 3.805542E+01 dL0 = 1.514926E-02 Tb = 2.328291E+03 Tu = 3.450E+02 Alpha = ... (3 Replies)
Discussion started by: lost.identity
3 Replies

2. Shell Programming and Scripting

Validating a datafile with the datatypes

I have two input files 1)datafile 2)metadata file. I have a metadata file like: field1datatypeformat1number2string3dateyy-mm-dd I have a data file like: 1234abc12-8-16 xyz234512-9-163456acd14-08-12 In the first row there is no correction as everything is inline with the metadata.... (3 Replies)
Discussion started by: bikky6
3 Replies

3. Shell Programming and Scripting

Help with datafile parsing and creating spreadsheet

I have a datafile containing data in the following format name1,employee_number1,cell1,home1,fax1 name2,employee_number2,cell2,home2,fax2 name3,employee_number3,cell3,home3,fax3 name4,employee_number4,cell4,home4,fax4 name5,employee_number5,cell5,home5,fax5 ... ... .... I would like... (6 Replies)
Discussion started by: inditopgun
6 Replies

4. Shell Programming and Scripting

sorting the datafile in an order given in second datafile

Hi, I have two files: first input file is having 7-8 columns, and second data file is like I want to arrange my datafile1 in the order given in second data file, by comparing the seconddatafile with the second column of first file and print the entire line....also if any... (2 Replies)
Discussion started by: CAch
2 Replies

5. UNIX for Dummies Questions & Answers

Insert text in datafile with uneven columns

Dear Unix Gurus, I have a dataset consisting of a number of uneven columns. What I would like to do is fill up the missing rows with an arbitrary text of fixed value so that all columns now have an equal number of rows. for example, in the sample datafile below... 1.0 1.3 0.25 2.2 2.0... (2 Replies)
Discussion started by: tintin72
2 Replies

6. Shell Programming and Scripting

Combine a datafile with Master datafile, emergent!

Hi guys, my supervisor has asked me to solve the problem in 7 days, I've taken 3 days to think about it but couldn't figure out any idea. Please give me some thoughts with the following problem, I have index.database that has only index date: 1994 1995 1996 1997 1998 1999 I have... (6 Replies)
Discussion started by: onthetopo
6 Replies

7. UNIX for Dummies Questions & Answers

Append filename to datafile

I am working on an shell script which checks for all the file starting with abc*.* and if file found then the filelines need to append the file name in begining can some one help with the filename appending... for i in `ls $filename*.csv` do echo $i --- NEED to append file name befor... (3 Replies)
Discussion started by: Satyagiri
3 Replies

8. Shell Programming and Scripting

selective positions from a datafile

Hi dear friends, Im writing a shell script which has to select the strings based on the position. but the problem is there is no field seperator. Normally a datafile contains 2000 records (lines) and each line is of size 500 charecters. I want to select the fields from all the lines which... (10 Replies)
Discussion started by: ganapati
10 Replies

9. Solaris

oracle datafile *dbf

Hi ,,,, I have move an oracle db from old server to a new server ( solaris 5.9 is the operating system ) my problem is that to new server the datafile ( *.dbf ) are in a different path ..... example old : /export/home/data/blobs ........... new /oracle/data/blobs....... how i can... (3 Replies)
Discussion started by: tt155
3 Replies

10. Shell Programming and Scripting

replace one section in a datafile

Hi: First, this is not a homework problem. I just need enough of a hint to get this going... My datafile (dataf.in) is made up of 10 sections. Each section begins with & and with && So it looks like this:------------------------------------- &section1 ...etc... && &section2 ...etc...... (4 Replies)
Discussion started by: Paprika
4 Replies

Featured Tech Videos