UNIX -Tracking File I/O

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers UNIX -Tracking File I/O
# 1  
Old 07-03-2018
UNIX -Tracking File I/O

Hi Team,

I have a requirement. We are processing 100s of thousands of files and had to tar 10K files each

The problem I face is, I would need to add the file into tar only when the write operation in the file is complete. How would I achieve this.

OS : Sun Solaris 5.8
Shell : KSH

---------- Post updated at 03:21 PM ---------- Previous update was at 03:20 PM ----------

No code fragments or data samples in this post
# 2  
Old 07-03-2018
Are these files created/written for a set time? For example, 5 minute logs? If so, you could select only files which are greater than 5 minutes old.

Please elaborate on the scenario with regards to these files time frames.
# 3  
Old 07-03-2018
The file is not getting generated on a fixed time unfortunately
# 4  
Old 07-03-2018
Okay, so how are they being created???
# 5  
Old 07-03-2018
Are files created, written to, and then permanently closed? Or could they be reopened?
# 6  
Old 07-03-2018
Hi,

The files are created by another process. The file write once complete, it will not be re-opened again.
# 7  
Old 07-03-2018
The fuser command lists the opening processes. If nothing is listed then the file is not opened.
Example shell script:
Code:
pids=`fuser filename 2>/dev/null`
if [ -z "$pids" ]
then
  echo "not opened"
fi

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Tracking All session history in one file

Dear All, I want to keep all the session history in one file,please help me out to configure so. Here is the test scenario- Suppose i have three client A,B and C tries to log in to one Server XA there session specific command and Clint IPADDRESS should get logged in one file...like ... (0 Replies)
Discussion started by: monojcool
0 Replies

2. Red Hat

Tracking Process to a particular

I've tried to see what I can find on my own but I'm coming up with goose eggs. Basically I was wondering if there was a way of querying the scheduler (or something similar) to track a process back to a particular CPU it's executing on at the time of the command. ps has a "cpu" output option but... (1 Reply)
Discussion started by: thmnetwork
1 Replies

3. Shell Programming and Scripting

Shell script in tracking both the passed and failed login in a unix server

Can you help me in providing the following output or a quite similar to this from a shell script ? *** Logins Summary Information ***** ---------------------------------- Failed Login Attempts for Invalid Accounts Date Time IP-ADD Account ... (0 Replies)
Discussion started by: linuxgeek
0 Replies

4. Shell Programming and Scripting

Script for tracking from directory to file

Hi , I am pretty new to scripting, and I trying to write a script which is not working as I expect to .... I am trying to write a script which starts from top directory and tracks all the folders and sub-folders till it reaches a file and gives the list of files as output for a given... (2 Replies)
Discussion started by: Rahul00000
2 Replies

5. Filesystems, Disks and Memory

regarding tracking file updates on linux networking environment

could anyone Explain me with how the linux o/s keeps track of file updates in network environment? for example, assume that more than one computer is connected to network (with linux in all of them). if an user say 'X' logged into terminal 1 and created a file with the name of 'temp.txt'. The... (1 Reply)
Discussion started by: pjchoudary
1 Replies

6. IP Networking

regarding tracking file updates on linux networking environment

could anyone Explain me with how the linux o/s keeps track of file updates in network environment? for example, assume that more than one computer is connected to network (with linux in all of them). if an user say 'X' logged into terminal 1 and created a file with the name of 'temp.txt'. The... (1 Reply)
Discussion started by: pjchoudary
1 Replies

7. UNIX for Advanced & Expert Users

Tracking down the problem

Is there a way to track down what process is sending to a certain port? I have some thing pounding the network with requests to a multicast IP that doesn't exist. I have shut down all comms related processes and yet it is still there. Need a way to track the port or IP back to the process. Thanks... (3 Replies)
Discussion started by: mattmanuel
3 Replies

8. UNIX for Advanced & Expert Users

Tracking user

dear all, I'm facing problem that is i have noticed from few days back that some body is deleting and making changes in the file from developement server where i'm working(in unix) so i want to track that who is using the server, what performancr they are doing and each every thing which r... (5 Replies)
Discussion started by: panknil
5 Replies

9. UNIX for Advanced & Expert Users

Command Tracking

Hi, OS: Solaris9, SPARC Is there any way I can track the commands run by users from the shell prompt? Example: Somebody is deleting files from the system. Who it is is a mystery. That person obviously does not use bash prompt so there is no history. Is there anyway I can find out who... (5 Replies)
Discussion started by: mahatma
5 Replies

10. Cybersecurity

Unix tracking software versions

I want to maintain a repository to track versions of common daemons running on several platforms such as apache, ssh, mysql; so that i can asociate vulnerabilities for each version of sw, Does anyone know if there is a project about this requirement? I search for projects in sourceforge, freshmeat... (2 Replies)
Discussion started by: Nektar
2 Replies
Login or Register to Ask a Question