Unix file systems store the last attribute change in the ctime attribute. Can be displayed with
the ctime changes if
- permission/owner changes
- a time (mtime,atime) changes
- the length changes by a write
Hi there
We have had a weird problem arise recently whereby a file owned by cjo:cjogroup suddenly had it's permissions changed to nobody4:nogroup. The file is mounted off a NetApp Filer volume with the NFS permissions set to Read-Write Access (All Hosts) but no Root Access.
When we tried to... (1 Reply)
What I need to do is: I need to use the grep command to search for pattern in directory and sub-directories. And also I need to show the permission of file been seached by the grep command.
Could any one please suggest me?
-----------------
$> cat file1.txt
A
-----------------... (8 Replies)
hello,
I have to write a script to run the other script inside it.So iam planning to write like this?
first check the perimissions of the file.
Alogorthim
----------
if(!filepermissions == execute)
then
echo" Permissions denined"
else
execute the script.
file name is : load_mf.sh... (1 Reply)
Discussion started by: rajkumar_g
1 Replies
4. Post Here to Contact Site Administrators and Moderators
I cannot seem to post within any thread as I require moderator approval. I believe my permissions have been changed and was wondering whats the reason behind this.
Thanks. (3 Replies)
Hi.
I've had a little mishap.
To cut a long story short, I've accidentally recursively ran chown on a directory (actually a bunch of 'em). Not a problem in itself, but I had a slight error in the code I used to get the list of directories and ended up with a comment in the file ownership.
... (15 Replies)
I was installing cygwin on my Windows 7 desktop. I guess I picked a bad mirror site because the download speed was very slow and it wasn't able to give me all the packages I wanted.
I closed the setup in too much haste. I think it was still downloading and not yet installing though. It said that... (1 Reply)
Hi All,
I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :(
which have similar names ( /var in root and var of some other directory ).:confused:
Can some one suggest me with the... (1 Reply)
Hi,
For a particular set of files, am trying to check if they are writable. i.e., checking whether they are having permissions greater than 755.
Am able to check this using the statement:
"if (os.path.isfile(FILE_PATH) and (os.stat(FILE_PATH).st_mode & 0777) == 0777):"
But the problem here... (0 Replies)
Hi,
For a particular set of files, am trying to check if they are writable. i.e., checking whether they are having permissions greater than 755.
Am able to check this using the statement:
"if (os.path.isfile(FILE_PATH) and (os.stat(FILE_PATH).st_mode & 0777) == 0777):"
But the problem... (1 Reply)
Hello,
I would like to know if it's a good practice to check the file permissions of the contents of a directory before moving them. For example:
mv -- "$directory"/* "$directory"/.* "$directory"/..?* "$destination"The variables $directory and $destination contain the path to an existing... (6 Replies)
Discussion started by: Cacializ
6 Replies
LEARN ABOUT DEBIAN
tmpwatch
TMPWATCH(8) System Administrator's Manual TMPWATCH(8)NAME
tmpwatch - removes files which haven't been accessed for a period of time
SYNOPSIS
tmpwatch [-u|-m|-c] [-MUadfqstvx] [--verbose] [--force] [--all]
[--nodirs] [--nosymlinks] [--test] [--fuser] [--quiet]
[--atime|--mtime|--ctime] [--dirmtime] [--exclude path]
[--exclude-user user] time dirs
DESCRIPTION
tmpwatch recursively removes files which haven't been accessed for a given time. Normally, it's used to clean up directories which are
used for temporary holding space such as /tmp.
When changing directories, tmpwatch is very sensitive to possible race conditions and will exit with an error if one is detected. It does
not follow symbolic links in the directories it's cleaning (even if a symbolic link is given as its argument), will not switch filesystems,
skips lost+found directories owned by the root user, and only removes empty directories, regular files, and symbolic links.
By default, tmpwatch dates files by their atime (access time), not their mtime (modification time). If files aren't being removed when ls
-l implies they should be, use ls -u to examine their atime to see if that explains the problem.
If the --atime, --ctime or --mtime options are used in combination, the decision about deleting a file will be based on the maximum of
these times. The --dirmtime option implies ignoring atime of directories, even if the --atime option is used.
The time parameter defines the threshold for removing files. If the file has not been accessed for time, the file is removed. The time
argument is a number with an optional single-character suffix specifying the units: h for hours, d for days. If no suffix is specified,
time is in hours.
Following this, one or more directories may be given for tmpwatch to clean up.
OPTIONS -u, --atime
Make the decision about deleting a file based on the file's atime (access time). This is the default.
Note that the periodic updatedb file system scans keep the atime of directories recent.
-m, --mtime
Make the decision about deleting a file based on the file's mtime (modification time) instead of the atime.
-c, --ctime
Make the decision about deleting a file based on the file's ctime (inode change time) instead of the atime; for directories, make
the decision based on the mtime.
-M, --dirmtime
Make the decision about deleting a directory based on the directory's mtime (modification time) instead of the atime; completely
ignore atime for directories.
-a, --all
Remove all file types, not just regular files, symbolic links and directories.
-d, --nodirs
Do not attempt to remove directories, even if they are empty.
-f, --force
Remove files even if root doesn't have write access (akin to rm -f).
-l, --nosymlinks
Do not attempt to remove symbolic links.
-q, --quiet
Report only fatal errors.
-s, --fuser
Attempt to use the "fuser" command to see if a file is already open before removing it. Not enabled by default. Does help in some
circumstances, but not all. Dependent on fuser being installed in /sbin. Not supported on HP-UX or Solaris.
-t, --test
Don't remove files, but go through the motions of removing them. This implies -v.
-U, --exclude-user=user
Don't remove files owned by user, which can be an user name or numeric user ID.
-v, --verbose
Print a verbose display. Two levels of verboseness are available -- use this option twice to get the most verbose output.
-x, --exclude=path
Skip path; if path is a directory, all files contained in it are skipped too. If path does not exist, it must be an absolute path
that contains no symbolic links.
SEE ALSO cron(1), ls(1), rm(1), fuser(1)WARNINGS
GNU-style long options are not supported on HP-UX.
AUTHORS
Erik Troan <ewt@redhat.com>
Preston Brown <pbrown@redhat.com>
Nalin Dahyabhai <nalin@redhat.com>
Miloslav Trmac <mitr@redhat.com>
4th Berkeley Distribution Fri Dec 14 2007 TMPWATCH(8)