08-07-2012
Why I don't see the time in some file/directory?
Hi all,
When doing an ls -l, why is it that I have the date and time on some of the files and directory, while others don't?
Is there a way to show the date and time using a different command?
OS is Linux and Solaris.
Any response much appreciated. Thanks in advance.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a directory with permissions set 777, and some gumby has dumped a bunch of files and directories in there.
I don't own the culprit files or directories, but do own the containing directory - Is there some way I can delete this other user's files?
The other interesting thing is that... (5 Replies)
Discussion started by: kumachan
5 Replies
2. Programming
I have a number of files of the format filename.xfr_mmddyy_%H%M%S which i get in a specified directory daily. Now i want to search in the specified directory & delete the files which are more than 2 days old .So I use a command
find $DIR/backup/* -ctime +2 -exec rm -f {} \;
But after executing... (1 Reply)
Discussion started by: dharmesht
1 Replies
3. UNIX for Dummies Questions & Answers
Hi All
i want to write a script which could copy one file at a time from one directory to another directory.
Scenerio:
Let's say i have 100 file in a dirctory,so i want to copy one file at a time to another directory with a sleep statement in between that of 30 secs.
please help me... (1 Reply)
Discussion started by: Nikhilindurkar
1 Replies
4. Shell Programming and Scripting
Hi.,
Last modified time of the folder is changing when I view the file inside the directory. Here is the test on sample directory. I believe that ls -l commands gives the time detail w.r.t last modified time. Pl. suggest.
bash-3.2$ mkdir test
bash-3.2$ cd test
bash-3.2$ touch myfile.txt... (2 Replies)
Discussion started by: IND123
2 Replies
5. UNIX for Dummies Questions & Answers
Greetings,
I wasn't able to find this exact issue through a forum search, so I hope it is not a repost.
I have a directory of files that all end in ".log", and I would like to grep out something from the most recently created file in the directory without knowing the exact file name (aka I... (2 Replies)
Discussion started by: Tennesseej
2 Replies
6. Shell Programming and Scripting
I have directory with shorcuts of files.
for example:
gara@yn\short\name1 ( shortcut to gara@yn\FOLDER\OPT\GARA\1.jpg )
gara@yn\short\name2 ( shortcut to gara@yn\FOLDER\OPT\GARA\11.jpg )
gara@yn\short\name3 ( shortcut to gara@yn\MARA\URSA\2.jpg )
gara@yn\short\name4 ( shortcut to... (6 Replies)
Discussion started by: gogok_bg
6 Replies
7. Shell Programming and Scripting
hi,
i have a Archive directory in which files are archived or stored with date and time stamp to prevent over writing.
example:
there are 5 files
s1.txt
s2.txt
s3.txt
s4.txt
s5.txt
while moving these files to archive directory, date and time stamp is added.
of format `date... (9 Replies)
Discussion started by: Little
9 Replies
8. Shell Programming and Scripting
Dears,
I am looking for a script which will work as a watch directory.
I ha directory which keep getting files in every 10 mins and some time delay.
I want to monitor if the directory getting the files in every 10 mins if not captured the last received file time and calculate the delay.
... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
9. UNIX for Beginners Questions & Answers
A process xyz is running and creating file1, file2, file3, .... filen. how do i know if the process has stopped and createtime of the last file (filen) is older than 5 minutes?
OS is AIX (3 Replies)
Discussion started by: malaika
3 Replies
LEARN ABOUT OPENSOLARIS
restorecon
restorecon(8) restorecon(8)
NAME
restorecon - restore file(s) default SELinux security contexts.
SYNOPSIS
restorecon [-o outfilename ] [-R] [-n] [-p] [-v] [-e directory ] pathname...
restorecon -f infilename [-o outfilename ] [-e directory ] [-R] [-n] [-p] [-v] [-F]
DESCRIPTION
This manual page describes the restorecon program.
This program is primarily used to set the security context (extended attributes) on one or more files.
It can be run at any time to correct errors, to add support for new policy, or with the -n option it can just check whether the file con-
texts are all as you expect.
It is the same executable as setfiles but operates in a slightly different manner depending on it's argv[0].
OPTIONS
-i ignore files that do not exist
-f infilename
infilename contains a list of files to be processed by application. Use - for stdin.
-e directory
directory to exclude (repeat option for more than one directory.)
-R -r change files and directories file labels recursively
-n don't change any file labels.
-o outfilename
save list of files with incorrect context in outfilename.
-p show progress by printing * every 1000 files.
-v show changes in file labels.
-vv show changes in file labels, if type, role, or user are changing.
-p show a progress indication in the form of one dot per 1000 files.
-F Force reset of context to match file_context for customizable files, or the user section, if it has changed.
-0 Input items are terminated by a null character instead of by whitespace, and the quotes and backslash are not special (every char-
acter is taken literally). Disables the end of file string, which is treated like any other argument. Useful when input items
might contain white space, quote marks, or backslashes.The GNU find -print0 option produces input suitable for this mode.
ARGUMENTS
pathname... The pathname for the file(s) to be relabeled.
NOTE
restorecon does not follow symbolic links.
AUTHOR
This man page was written by Dan Walsh <dwalsh@redhat.com>. Some of the content of this man page was taken from the setfiles man page
written by Russell Coker <russell@coker.com.au>. The program was written by Dan Walsh <dwalsh@redhat.com>.
SEE ALSO
load_policy(8), checkpolicy(8) setfiles(8)
2002031409 restorecon(8)