What files are writing to a directory


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers What files are writing to a directory
# 1  
Old 01-16-2006
What files are writing to a directory

Is there a way to tell what files/scripts are writing/wrote to a given directory?
# 2  
Old 01-17-2006
How about using:
Code:
ls /directory_name

# 3  
Old 01-17-2006
If you mean what processes are accessing files / directories look at the lsof and/or fuser commands.

Cheers
ZB
# 4  
Old 01-17-2006
If it is not process that you want to find out but rather the files that are currently written to, I only know that the dtrace in Solaris 10 is capable of this.

Very cool tool.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Stop root from writing to directory

Is there a way to stop root from writing to a directory? I already tried chattr but that did not seem to work. chattr +i directory (12 Replies)
Discussion started by: cokedude
12 Replies

2. Shell Programming and Scripting

Directory containing files,Print names of the files in the directory that are exactly same content.

Given a directory containing say a few thousand files, please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents. func(a_directory_name) output -> {“matches”: , ... ]} e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies

3. UNIX for Dummies Questions & Answers

[Solved] Writing a loop to changing the names of files in a directory

Hi, I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

4. Shell Programming and Scripting

Writing Script to Copy Newest Directory

I am trying to write a script that once executed it will search within a directory and copy only the newest directory that has not been copied before to a new location. Kind of like what ROBOCOPY /M does in windows? The directories are not left in the new location so using a sync action won't... (2 Replies)
Discussion started by: Keriderf
2 Replies

5. Programming

Writing files using O_DIRECT in C

I am trying to write .pgm images using the O_DIRECT flag in open(). I have a char* buffer which has the image data. I know that I have to align the buffers and have done that using posix_memalign() yet only a part of the image gets written. Has someone used O_DIRECT for writing files... (3 Replies)
Discussion started by: anchit87
3 Replies

6. UNIX for Dummies Questions & Answers

Writing a text to many files

Is there a command in shell-script that I can use that copies a string or writes it to many files? Say I have files a, b and c and I want to copy or write the text "Hallo, I am a newbie!" to all these files? I know I can do echo "Hallo, I am a newbie!" > a but this only copies it to one file. How... (2 Replies)
Discussion started by: #moveon
2 Replies

7. Shell Programming and Scripting

Writing files without temporary files

Hey Guys, I was wondering if someone would give me a hand with an issue I'm having, let me explain the situation: I have a file that is constantly being written to and read from with updated lines: # cat activity.file activity1 activity2 activity3 activity4 activity5 This file... (2 Replies)
Discussion started by: bashshadow1979
2 Replies

8. Shell Programming and Scripting

Shell script for a writing the directory structure to a file

Hi All, I am new user of shell scripting has come up with a problem. that I have a directory structure like : Home | |--------A | |----trunk | |-------A_0_1/ | | | |-------A_0_2/ | |--------B | ... (6 Replies)
Discussion started by: bhaskar_m
6 Replies

9. UNIX for Dummies Questions & Answers

new to writing script files

thanks guys i managed to answer (0 Replies)
Discussion started by: bebop1111116
0 Replies

10. Shell Programming and Scripting

writing script to clean up a directory

I have to do a directory clean up on several machines. The task is as follows: go to a particular directory (cd /xxx) 1. create a directory ' SCRIPTCLEANUP ' ( i KNOW IT) loop through 2. List the directory 3. if directory and start with 'DQA' leave it, 4. if directory or file move it to... (0 Replies)
Discussion started by: ajaya
0 Replies
Login or Register to Ask a Question