{"id":22180643,"url":"https://github.com/jftuga/fstat","last_synced_at":"2025-07-26T17:32:25.172Z","repository":{"id":39787729,"uuid":"174044817","full_name":"jftuga/fstat","owner":"jftuga","description":"Get info for a list of files across multiple directories","archived":false,"fork":false,"pushed_at":"2024-06-11T14:26:46.000Z","size":112,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-21T13:07:26.271Z","etag":null,"topics":["go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jftuga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-06T00:59:56.000Z","updated_at":"2024-06-11T14:26:50.000Z","dependencies_parsed_at":"2024-06-11T16:19:18.464Z","dependency_job_id":"67470aed-e647-4325-a9f7-2afad4c401a9","html_url":"https://github.com/jftuga/fstat","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Ffstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Ffstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Ffstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Ffstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jftuga","download_url":"https://codeload.github.com/jftuga/fstat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227700390,"owners_count":17806365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang"],"created_at":"2024-12-02T09:18:59.210Z","updated_at":"2024-12-02T09:19:00.333Z","avatar_url":"https://github.com/jftuga.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fstat\n\n`fstat` is useful when you need to obtain file names, sizes, and timestamps across multiple directories.  You can also sort the output by timestamp, file size, and file name (both case-sensitive and case-insensitive). \n\nThe [Releases Page](https://github.com/jftuga/fstat/releases) contains binaries for Windows, MacOS, Linux and FreeBSD.\n\nHomebrew (MacOS / Linux):\n* `brew tap jftuga/homebrew-tap; brew update; brew install jftuga/tap/fstat`\n\n\nFor the `TYPE` column (see examples below):\n\n* `F` represents regular file\n* `D` represents directory\n* `L` represents symbolic link\n\n___\n\n### Usage\n```\nfstat: Get info for a list of files across multiple directories\nusage: fstat [options] [filename|or blank for STDIN]\n       (this file should contain a list of files to process)\n\n  -M\tadd milliseconds to file time stamps\n  -c\tadd comma thousands separator to file sizes\n  -dn string\n    \tonly include if date is equal or newer than given YYYYMMDD date\n  -do string\n    \tonly include if date is equal or older than given YYYYMMDD date\n  -ed\n    \texclude-dot, exclude all dot files and directories\n  -er string\n    \texclude-regexp, exclude based on given regular expression; use .* instead of just *\n  -f string\n    \tuse these files instead of from a file or STDIN, can include wildcards\n  -id\n    \tinclude only directories\n  -if\n    \tinclude only files\n  -il\n    \tinclude only symbolic links\n  -ir string\n    \tinclude-regexp, only include based on given regular expression; use .* instead of just *\n  -long\n    \tDon't use ellipses for long file names; useful when piping or using redirection\n  -longwidth int\n    \tSet max width; Useful when piping or using redirection\n  -m\tconvert file sizes to mebibytes\n  -oc\n    \toutput to CSV format\n  -oh\n    \toutput to HTML format\n  -oj\n    \toutput to JSON format\n  -q\tdo not display file errors\n  -sD\n    \tsort by file modified date, newest first\n  -sI\n    \tsort by file name, ignore case, reverse alphabetical order\n  -sN\n    \tsort by file name, reverse alphabetical order\n  -sS\n    \tsort by file size, descending\n  -sd\n    \tsort by file modified date\n  -si\n    \tsort by file name, ignore case\n  -sn\n    \tsort by file name\n  -ss\n    \tsort by file size\n  -szl int\n    \tonly include if file size is equal or larger than given value (in bytes)\n  -szs int\n    \tonly include if file size is equal or smaller than given value (in bytes)\n  -t\tappend total file size and file count\n  -v\tshow program version and then exit\n\nNotes:\n  (1) -er precedes -ir\n  (2) Use '(?i)' at the beginning of a regex to make it case insensitive\n```\n\n___\n\n### Examples\n\nRunning `fstat` on Windows with no options:\n```\nc:\\\u003e dir /s/b \"c:\\Program Files\\Microsoft Office\\*.exe\" | fstat.exe\n\n+---------------------+---------+------+---------------------------------------------------------------------------------------------------+\n|      MOD TIME       |  SIZE   | TYPE |                                                           NAME                                    |\n+---------------------+---------+------+---------------------------------------------------------------------------------------------------+\n| 2019-02-20 14:35:11 |  414360 | F    | c:\\Program Files\\Microsoft Office\\root\\Office16\\VPREVIEW.EXE                                      |\n| 2019-02-20 14:35:11 | 1966392 | F    | c:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE                                       |\n| 2018-12-05 10:10:48 |  289584 | F    | c:\\Program Files\\Microsoft Office\\root\\Office16\\1033\\VISEVMON.EXE                                 |\n| 2019-02-20 14:34:56 |   40264 | F    | c:\\Program Files\\Microsoft Office\\root\\Office16\\DCF\\Common.DBConnection.exe                       |\n| 2019-02-20 14:34:56 |  186704 | F    | c:\\Program Files\\Microsoft Office\\root\\Office16\\DCF\\DATABASECOMPARE.EXE                           |\n| 2018-12-05 10:12:18 |  267384 | F    | c:\\Program Files\\Microsoft Office\\root\\Office16\\DCF\\filecompare.exe                               |\n| 2019-02-20 14:34:56 |  465528 | F    | c:\\Program Files\\Microsoft Office\\root\\Office16\\DCF\\SPREADSHEETCOMPARE.EXE                        |\n| 2018-12-05 10:11:37 |   82240 | F    | c:\\Program Files\\Microsoft Office\\root\\Office16\\SkypeSrv\\SKYPESERVER.EXE                          |\n| 2019-01-10 10:06:19 |  372864 | F    | c:\\Program Files\\Microsoft Office\\root\\vfs\\ProgramFilesX64\\Microsoft Office\\Office16\\MSOHTMED.EXE |\n+---------------------+---------+------+---------------------------------------------------------------------------------------------------+\n```\n\nRunning `fstat` in Windows with `-f` option:\n```\nc:\\\u003e fstat.exe -f \"c:\\Windows\\Microsoft.NET\\Framework*\\*\\csc.exe\"\n\n+---------------------+---------+------+---------------------------------------------------------+\n|      MOD TIME       |  SIZE   | TYPE |                          NAME                           |\n+---------------------+---------+------+---------------------------------------------------------+\n| 2016-05-25 10:56:04 | 1545864 | F    | c:\\Windows\\Microsoft.NET\\Framework\\v3.5\\csc.exe         |\n| 2017-04-21 17:53:36 | 2170488 | F    | c:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\csc.exe   |\n| 2016-07-14 14:18:12 |   88712 | F    | c:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\csc.exe |\n| 2016-05-25 14:29:34 | 2288264 | F    | c:\\Windows\\Microsoft.NET\\Framework64\\v3.5\\csc.exe       |\n| 2017-04-21 17:50:55 | 2738296 | F    | c:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\csc.exe |\n| 2016-07-13 14:33:18 |   77960 | F    | c:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe   |\n+---------------------+---------+------+---------------------------------------------------------+\n```\n\nRunning `fstat` on Linux, using `-f` option:\n```\nuser@debian:~$ fstat -f \"/usr/*bin/f*g /etc/pa*\"\n\n+---------------------+-------+------+--------------------+\n|      MOD TIME       | SIZE  | TYPE |        NAME        |\n+---------------------+-------+------+--------------------+\n| 2018-12-23 18:59:35 |  1421 | F    | /etc/passwd        |\n| 2018-12-23 18:59:35 |  1421 | F    | /etc/passwd-       |\n| 2017-05-17 07:59:59 | 18728 | F    | /usr/bin/faillog   |\n| 2017-01-31 19:54:55 | 14352 | F    | /usr/sbin/filefrag |\n| 2017-05-27 11:44:02 |   552 | F    | /etc/pam.conf      |\n| 2019-03-04 06:17:55 |  4096 | D    | /etc/pam.d         |\n+---------------------+-------+------+--------------------+\n```\n\n\nRunning `fstat` on Linux, using `-ss` to sort by file size\n```\nuser@debian:~$ find /usr/share -name '*exec*' | fstat -ss\n\n+---------------------+-------+------+-----------------------------------------------------+\n|      MOD TIME       | SIZE  | TYPE |                        NAME                         |\n+---------------------+-------+------+-----------------------------------------------------+\n| 2016-02-19 03:25:10 |    10 | L    | /usr/share/terminfo/e/exec80                        |\n| 2019-02-13 18:30:49 |    25 | L    | /usr/share/man/man8/systemd-kexec.service.8.gz      |\n| 2016-02-19 03:22:31 |  1081 | F    | /usr/share/terminfo/o/osexec                        |\n| 2018-04-09 07:47:32 |  1746 | F    | /usr/share/man/man8/pam_exec.8.gz                   |\n| 2018-09-27 18:09:42 |  2690 | F    | /usr/share/man/man8/aa-exec.8.gz                    |\n| 2018-11-28 19:19:27 |  2699 | F    | /usr/share/mime/application/x-executable.xml        |\n| 2018-11-28 19:19:28 |  2865 | F    | /usr/share/mime/application/x-pef-executable.xml    |\n| 2019-01-15 08:52:42 |  3440 | F    | /usr/share/man/man1/pkexec.1.gz                     |\n| 2018-11-28 19:19:28 |  3491 | F    | /usr/share/mime/application/x-ms-dos-executable.xml |\n| 2016-11-24 15:50:23 |  3910 | F    | /usr/share/vim/vim74/syntax/focexec.vim             |\n| 2019-02-13 18:30:43 | 12619 | F    | /usr/share/man/man5/systemd.exec.5.gz               |\n+---------------------+-------+------+-----------------------------------------------------+\n```\n\nRunning `fstat` on MacOS, using `-sS -c` to sort by file size decending, adding commas to file size\n```\nmacbook:fstat user$ find /Applications/Safari.app/Contents/ -name G\\*nib|./fstat -sS -c\n+---------------------+--------+------+--------------------------------------------------------------------------------+\n|      MOD TIME       |  SIZE  | TYPE |                                      NAME                                      |\n+---------------------+--------+------+--------------------------------------------------------------------------------+\n| 2019-01-14 21:29:46 | 34,759 | F    | /Applications/Safari.app/Contents//Resources/Base.lproj/GeneralPreferences.nib |\n| 2019-01-14 21:44:24 | 31,084 | F    | /Applications/Safari.app/Contents//Resources/ko.lproj/GeneralPreferences.nib   |\n+---------------------+--------+------+--------------------------------------------------------------------------------+\n```\n\nRunning `fstat` on Linux, using `-sD` to sort by modification time, newest timestamp first\n```\nuser@debian:~$ find /lib | grep cryptsetup | ./fstat -sD\n\n+---------------------+--------+------+-------------------------------------------------------------+\n|      MOD TIME       |  SIZE  | TYPE |                            NAME                             |\n+---------------------+--------+------+-------------------------------------------------------------+\n| 2019-02-13 18:31:00 |  72296 | F    | /lib/systemd/system-generators/systemd-cryptsetup-generator |\n| 2019-02-13 18:30:59 |  92752 | F    | /lib/systemd/systemd-cryptsetup                             |\n| 2019-02-13 18:30:47 |     20 | L    | /lib/systemd/system/sysinit.target.wants/cryptsetup.target  |\n| 2019-02-13 18:30:36 |    366 | F    | /lib/systemd/system/cryptsetup.target                       |\n| 2018-03-26 12:32:43 |   4096 | D    | /lib/cryptsetup/checks                                      |\n| 2018-03-26 12:32:43 |   4096 | D    | /lib/cryptsetup                                             |\n| 2018-03-26 12:32:43 |   4096 | D    | /lib/cryptsetup/scripts                                     |\n| 2018-03-26 12:31:16 |     22 | L    | /lib/x86_64-linux-gnu/libcryptsetup.so.4                    |\n| 2017-09-06 06:08:21 |  14928 | F    | /lib/cryptsetup/askpass                                     |\n| 2017-09-06 06:08:21 | 158920 | F    | /lib/x86_64-linux-gnu/libcryptsetup.so.4.6.0                |\n| 2017-09-06 06:08:21 |  10552 | F    | /lib/cryptsetup/scripts/passdev                             |\n| 2017-09-06 06:08:16 |   1040 | F    | /lib/cryptsetup/checks/blkid                                |\n| 2017-09-06 06:08:16 |  19047 | F    | /lib/cryptsetup/cryptdisks.functions                        |\n| 2017-09-06 06:08:16 |   1414 | F    | /lib/cryptsetup/scripts/decrypt_opensc                      |\n| 2017-09-06 06:08:16 |    347 | F    | /lib/cryptsetup/scripts/decrypt_ssl                         |\n| 2017-09-06 06:08:16 |    387 | F    | /lib/cryptsetup/checks/ext2                                 |\n| 2017-09-06 06:08:16 |    147 | F    | /lib/cryptsetup/checks/xfs                                  |\n+---------------------+--------+------+-------------------------------------------------------------+\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Ffstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjftuga%2Ffstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Ffstat/lists"}