linux-recent-files

Lists all recently created or modified files in all directories under the root directory. If no from or span options are specified, it only lists files created or modified in the last 1 day by default.

Syntax

linux-recent-files [OPTION]
Optional Parameters
from=yyyyMMddHHmmss
Start date and time of the search period in the form of yyyyMMddHHmmss (default: none). The time period for the search includes the specified time point. If you provide only the first part, the command recognizes the remaining digits as 0. For example, if you provide 20130605, the command recognizes it as 20130605000000 (June 5, 2013, 00:00:00). This option cannot be used with span.
span=INT{y|mon|w|d|h|m|s}
Time range to search the recent files based on the current time (default: 1d). You can specify time in units of y (year), mon (month), w (week), d (day), h (hour), m (minute), and s (second). For example, 10s refers to "the last 10 seconds" based on the current time.

Description

After running the linux-recent-files command, the output fields are as follows:

Output Fields

FieldTypeDescription
file_pathStringFile path
file_nameStringFile name
file_typeStringFile type
permissionsStringPermissions
file_sizeLongFile size
file_ctimeDateLast change time
file_mtimeDateLast modification time
file_atimeDateLast access time
owner_readBooleanWhether owner read permission is given
owner_writeBooleanWhether owner write permission is given
owner_executeBooleanWhether owner execute permission is given
group_readBooleanWhether group read permission is given
group_writeBooleanWhether group write permission is given
group_executeBooleanWhether group execute permission is given
others_readBooleanWhether other read permission is given
others_writeBooleanWhether other write permission is given
others_executeBooleanWhether other execute permission is given

Usage

  1. View a list of files created or modified in the last day

    linux-recent-files
    
  2. View a list of files created or modified in the last 7 days

    linux-recent-files span=7d
    
  3. View a list of files created or modified after January 1, 2021

    linux-recent-files from=20210101