0

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.

Cepheus
  • 101

2 Answers2

0

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
Eric Mintz
  • 2,536
0

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