Can't seem to find a way to view files in a folder by date added. I only see: modified, accessed, and recency and none solve my problem.
Edit: GNOME nautilus 3.26.3
I'd like to do this from the file manager and not the command line.
You can do something like this:
find . -mindepth 1 -maxdepth 1 -ctime -3
The "." means the current directory. You can replace the "." with a path to another directory.
mindepth and maxdepth of 1 will limit the list of files to just ones in that directory. If you want to see files in subdirectories too, then take those out.
ctime is the create time. you can also use mtime which means last modified time or atime which means last accessed time. The number after is in days (e.d., 3 days). -3 means less than three days. 3 means exactly 3 days. +3 means more than 3 days. You can use all three times at once:
find . -mindepth 1 -maxdepth 1 -ctime -3 -mtime -3 -atime -3
ctime
is the timestamp the inode was last changed. For example, chmod +x
changes a file's ctime
while leaving its mtime
alone.
– PerlDuck
Dec 23 '18 at 17:21
Linux has had birthdate
of a given filename in place for a long time with the stat
command:
$ stat /home/$USER/.bashrc
File: '/home/rick/.bashrc'
Size: 9161 Blocks: 24 IO Block: 4096 regular file
Device: 10306h/66310d Inode: 923399 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ rick) Gid: ( 1000/ rick)
Access: 2018-12-23 06:33:46.768933188 -0700
Modify: 2018-12-23 06:33:40.912884555 -0700
Change: 2018-12-23 06:33:40.924884655 -0700
Birth: -
However as you can see the filename /home/$USER/.bashrc
has a blank birthdate. Related question: When is Birth Date for a file actually used?
You can setup a function to list the filename's birthdate
though:
$ get_crtime ~/.bashrc
/home/rick/.bashrc Sun Dec 23 11:39:37 2018
first modified
option in nautilus! – George Udosen Dec 23 '18 at 15:06