Sponsored Content
Operating Systems AIX how to find which program that update a specific file Post 302709459 by gts1999 on Wednesday 3rd of October 2012 09:12:54 AM
Old 10-03-2012
If you need to know what program is actively using a file, try installing lsof (or get your Admins to do this).

If you want to see who modified (past tense) a file, you will need some sort of accounting or auditing enabled.
This will be trickier than you think I imagine.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Update specific lines in a file

Hi all, I want to add a special character ^M to a line, if the line starts with ORDE. All the other lines should remain unchanged. Is there sed or other UNIX function who can do this. Thanx in advance Auke Quist (3 Replies)
Discussion started by: aukequist
3 Replies

2. Shell Programming and Scripting

Update a specific line in a file while reading sequentially

All, I know this is a very naive question but I could not find a way to get this working! I have a file with values like input.file Value1 Value2 server1/mylogin,mypasswd Value3 Value4 And in my code, I am reading the file line by line and processing it. #! /bin/ksh... (6 Replies)
Discussion started by: bharath.gct
6 Replies

3. Shell Programming and Scripting

Update specific field in a line of text file

I have a text file like this: subject1:LecturerA:10 subject2:LecturerA:40 if I was given string in column 1 and 2 (which are subject 1 and LecturerA) , i need to update 3rd field of that line containing that given string , which is, number 10 need to be updated to 100 ,for example. The... (6 Replies)
Discussion started by: bmtoan
6 Replies

4. Shell Programming and Scripting

How to find a file with a specific pattern for current sysdate & upon find email the details?

I need assistance with following requirement, I am new to Unix. I want to do the following task but stuck with file creation date(sysdate) Following is the requirement I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
Discussion started by: PreetArul
4 Replies

5. Shell Programming and Scripting

Find and extract values from one file and update other

Gents, Kindly can you help me to update a file extracting the data from other file. I have: file1 The key in this file is substr($0,4,21), and I need to update the columns 6 and 7 using the information for file2. S 21133.00 21535.00 1 0 919088.8 1843754.5 ... (2 Replies)
Discussion started by: jiam912
2 Replies

6. Shell Programming and Scripting

Find and update line in xml file

Hi, I have a xml file that I need to modify 1 line to change some value from 2 to 10 (or any number). Sample input: <!-- some text here> . . . <message:test name="ryan"> <message:sample-channel charset="UTF-8" max-value="2" wait="20"> ... (5 Replies)
Discussion started by: brichigo
5 Replies

7. UNIX for Advanced & Expert Users

Last touched file by a specific program ?

i have a directory where all .csv files are available. i have 3 perl programs(ex: a.pl,b.pl,c.pl) which continuously runs every 1 minute to scan all files in that directory. now i have 2 questions 1) how can i write an app lock on that particular folder to make sure only one program will scan... (4 Replies)
Discussion started by: sbjv
4 Replies

8. Shell Programming and Scripting

awk to update specific value in file with match and add +1 to specific digit

I am trying to use awk to match the NM_ in file with $1 of id which is tab-delimited. The NM_ will always be in the line of file that starts with > and be after the second _. When there is a match between each NM_ and id, then the value of $2 in id is substituted or used to update the NM_. Each NM_... (3 Replies)
Discussion started by: cmccabe
3 Replies

9. Shell Programming and Scripting

Update a specific field in file with Variable value based on other Key Word

I have an input file with A=xyz B=pqr I would want the value in Second Field (xyz or pqr) updated with a value present in Shell Variable based on the value passed in the first field. (A or B ) while read line do NEW_VALUE = `some functionality done on $line` If $line=First Field-... (1 Reply)
Discussion started by: infernalhell
1 Replies
NNACCT(1m)																NNACCT(1m)

NAME
nnacct - news accounting and access authorization (nn) SYNOPSIS
nnacct -r [ -f file ] [ -a ] [ user ]... nnacct [ -ppolicy ] [ -qquota ] user... nnacct -ZERO DESCRIPTION
The nnacct command provides an optional accounting and access authorization for news reading via the nn news reader. The first form (-r) is used to print accounting reports. If a file is specified data from a saved accounting file; otherwise the data is read from the current accounting file. If -a is specified, the report will contain accounting data for all users. Otherwise, if one or more users are specified, the data for these users will be printed. If neiter is specified, only the accounting data for the current user is printed. Only the super-user can generate reports for other users than the caller. The second form (-p and/or -q) assigns the specified access policy and/or quota to the specified users. If a given user is not already known in the accounting file, a new entry with the specified policy and quota is created (default values are used if both are not speci- fied). The third form (-ZERO) will clear the usage counts for all users. Individual usage counts cannot be cleared. The original accounting file is saved with a .old suffix. The following policies are currently implemented: 0 No access. The user is not allowed to read news at all. 1 Privileged user. The user can read news at all times and no accounting information is saved. This is obviously the policy for sys- tem administrators :-) 2 Full time access. The user can access news at all times. 3 Off-hours access. The user can only access news at off hours, i.e. in the morning, in the evening, on week-ends, and on holidays (not complete - check the source :-) The quota specifies a number of hours which the user is allowed to read news. When this quota is used up, access will be blocked. A quota of zero gives unlimited access. New users will get the default policy and quota defined in account.c. If this allows new users to read news at only specific times, this form can be used to permit individual users to read news at all times, or it can be used to prevent them from reading news at all. If the default policy does not allow new users to read news, this form must be used to authorize them to read news. HOW IT WORKS
If authorization is enabled, the nn news reader will call nnacct on start-up to check whether the policy and quota defined for the current user allows him to read news at this time (or at all). If accounting is enabled, the nn news reader will call nnacct on exit to register the time spent on news reading. If account logging is also defined (see account.c), an line is also added to the accounting log file. When accounting is defined, the user can use the :cost command to get the current accounting data, and if the variable report-cost is set, nn will print accounting information on exit. CONTIGURATION AND NEW POLICIES
The use of nnacct is enabled via the ACCOUNTING and AUTHORIZE symbols in nn's configuration file. Further configuration of cost calcula- tions, logging, default policy, default quotas, etc. is done directly in the source file account.c. New access policies can also be defined in this file. This allows you to change the policies or prices without having to recompile the whole package since only nnacct is modified. PRIVILEGED USERS
Normally, only root is allowed to change user policy or quota, list all user's accounting data etc. This privilege can be shared with other users by listing their login name in the file $CLIENT/admins. There should be exactly one login name per line, and no blanks are allowed. FILES
$db/acct accounting data (accumulated per user) $db/acctlog accounting log (grows indefinitely) $lib/admins login names of privileged nnacct users. SEE ALSO
nn(1), nnusage(1) BUGS
There should be some tools to mess around with the accounting files, e.g. to make summaries, clear usage counters, etc. AUTHOR
Kim F. Storm, Texas Instruments A/S, Denmark E-mail: storm@texas.dk 4th Berkeley Distribution Release 6.6 NNACCT(1m)
All times are GMT -4. The time now is 10:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy