Sponsored Content
Full Discussion: who modified my file!!
Top Forums UNIX for Dummies Questions & Answers who modified my file!! Post 87189 by vijaygoutham on Friday 21st of October 2005 02:17:10 AM
Old 10-21-2005
Unix allows you to give three levels of permissions to the file.
a. Owner
b. Group
c. Others

When we do a ls -lt, the following is a sample output.

-rwxrwxrwx 1 vijay dev 4692060 Oct 13 17:22 core

The above file (core) the owner user is "vijay" and owner group is "dev". (vijay user is part of dev group. also dev group has other users as well).

rwxrwxrwx is the files permissions. The first three 'rwx' corresponds to the 'owner' user. The next three to the 'group' (all users within that group) and the last three is for all others.

So in the above example all (the owner i.e. user vijay, all users belonging to group 'dev' and all others have read, write and execute permissions)

When i change the permission as 'chmod 640 core', the permission becomes 'rw_r_____'. (Note - the owner of the file only can change the permission using chmod)

So now
user 'vijay' has permissions to read and write
all users under group dev have permissions to read
all other users do not have any permissions on the file.


So you can give permissions (if you are the owner) accordingly as to who all (users) can modify the file.

I am not aware of any command in Unix which will give you the user who last edited the file.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I get the last modified date of a file?

I am trying to load a group of files and their last dates modified into a text file that will in turn be used with SQL*Loader to load these files into Oracle. I am using a *.ksh script. I am getting the name of the file in by using the following: for file_ext in 'cat loaddir.ext'; do find... (2 Replies)
Discussion started by: akpopa
2 Replies

2. Programming

File last modified

I cannot read the last moment the file was modified - it returns "Most recent access" instead: code: </td> <th><?FILE *fatr=fopen(iindname.c_str(), "r"); if(fatr){ struct stat statbuf; fstat(fileno(fatr), &statbuf); fclose(fatr); ?> ... (4 Replies)
Discussion started by: szzz
4 Replies

3. UNIX for Dummies Questions & Answers

how to retrieve original contents of a modified file (modified using vi)

Made changes to a file using vi editor and saved those changes now realised that the changes are not required How can I get the previous version of the file.i.e the one which was there on which I had made changes (3 Replies)
Discussion started by: novice100
3 Replies

4. UNIX for Dummies Questions & Answers

Delete the last modified file

Hi All, I have the following script to delete the last modified file in a directory. #!/bin/ksh if file in $(ls -t /home/KOP/Purge | head -1) then rm -f $file fi But I keep getting the error 0653-901 Cannot get file status Any suggestions or comments as to where I'm getting... (1 Reply)
Discussion started by: kingofprussia
1 Replies

5. Shell Programming and Scripting

Last modified file in 2 or more directories

Hi, Is there any simple way to get the last modified file in a set of 2 or more directories? This should return one file only (not 1 file per directory) Thanks for your help (4 Replies)
Discussion started by: m69w
4 Replies

6. Shell Programming and Scripting

How many days since a file was modified?

I am trying to write a script to backup my laptop to a NAS drive using rsync. I want the backup to be done, only if it has been more than a week since my last backup. Each time the rsync command executes, I also create a file backuptime.txt file, with the time at which the script completed the... (1 Reply)
Discussion started by: anandjayaraman
1 Replies

7. Shell Programming and Scripting

How to get a filename modified by attaching modified timestamp

Hi, I want to modify a filename in AIX by attaching the last modified timestamp. I want the timestamp completely in numerical format (eg:200905081210. yr-2009, mnth - 05, date -08, hr - 12, mins - 10). For example if the filename is a.log and it was modified on April 6th 2008 at 21.00. I... (16 Replies)
Discussion started by: Ruks
16 Replies

8. Shell Programming and Scripting

changing a file when the inode modified time of the other file changes

i have a requirement where i needed to change variable values in a properties file(first file) whenever there is change to Release details file(second file). My question is do i have to create a daemon process that always checks the modified time/inode change of the second file and then change the... (1 Reply)
Discussion started by: saikiran_1984
1 Replies

9. Shell Programming and Scripting

Script to check for the file existence, if file exists it should echo the no of modified days

Hi, I am looking for a shell script with the following. 1. It should check whether a particular file exists in a location #!/bin/sh if ; then echo "xxx.txt File Exists" else echo "File Not Found" fi 2. If file exists, it should check for the modified date and run a command... (2 Replies)
Discussion started by: karthikeyan_mac
2 Replies

10. Shell Programming and Scripting

How to find a file modified more than once

Hi All, How to find a file modified more than once.... Thanks in advance (2 Replies)
Discussion started by: kmsekhar
2 Replies
Perspective(3I) 					    InterViews Reference Manual 					   Perspective(3I)

NAME
Perspective - visible portion of an interactor SYNOPSIS
#include <InterViews/perspective.h> DESCRIPTION
A perspective object describes which part of an interactor's total display area is visible in the interactor's canvas. The main use of perspectives is for scrolling, panning, and zooming interactors. The member variables (x0, y0) define the origin of the interactor's dis- play area; width and height define the total height of the area. The member variables (curx, cury) define the lower-left corner of the interactor's canvas relative to the total area; curwidth and curheight define how much of the total area is displayed in the canvas. The member variables sx, sy, lx, and ly specify small and large increments in each dimension. These increments are used by a scroller to implement line and page scrolling. PUBLIC OPERATIONS
Perspective() Define a new perspective with all member variables initialized to zero. void Attach(Interactor*) Add to the list of interactors that are interested in updates to the perspective. These interactors reflect the perspective visual- ly; examples include scrollers and sliders. void Detach(Interactor*) Remove an interactor from the list of those interested in updates. This operation should be called from the interactor's destruc- tor. void Init(Coord x0, Coord y0, Coord width, Coord height) Initialize the perspective display area. void Update() Notify all the interactors interested in the perspective that it has changed. The perspective's interactor should call Update after modifying its perspective. SEE ALSO
Adjuster(3I), Interactor(3I), Panner(3I), Scroller(3I) InterViews 15 June 1987 Perspective(3I)
All times are GMT -4. The time now is 12:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy