[PLUG] Ownerships and permissions mess
Michael Rasmussen
michael at jamhome.us
Sat Aug 10 15:40:33 UTC 2013
On Sat, Aug 10, 2013 at 09:30:56AM -0500, David Fleck wrote:
> > On 08/08/2013 06:47 PM, John Jason Jordan wrote:
> >> Is there a way to do a ls command and have it sort by date of creation?
>
> Try
>
> ls -lrt
Creation?
That isn't available in contemporary *nix, including Linuxes.
ctime https://en.wikipedia.org/wiki/Stat_(Unix)
ctime originally meant creation time,[8] however it has since been
used almost always to refer to change time. It is updated any time
file content changes (together with mtime), and also by changes in
metadata such as file permissions, file ownership, and creation and
deletion of hard links. In some implementations, ctime is affected by
renaming a file (both original Unix and modern Linux tend to do this).
Unlike atime and mtime, ctime cannot be set to an arbitrary value
with utime() (as used e.g. by touch). Instead, when utime() is used,
the ctime value is set to the current time.
And this is confirmed by `man 2 stat`
All of these system calls return a stat structure, which contains the following fields:
struct stat {
dev_t st_dev; /* ID of device containing file */
ino_t st_ino; /* inode number */
[ other stuff snipped ]
time_t st_atime; /* time of last access */
time_t st_mtime; /* time of last modification */
time_t st_ctime; /* time of last status change */
};
--
Michael Rasmussen, Portland Oregon
Be Appropriate && Follow Your Curiosity
Other Adventures: http://www.jamhome.us/ or http://gplus.to/MichaelRpdx
A special random fortune cookie fortune:
I'm eating slightly green peaches right now - kind of bitter, kind of sweet - sort of like my day.
~ Prefers to remain anonymous
More information about the PLUG
mailing list