File System - Analytics

> File (System, Transfer, Storage)

1 - About

See also: Tree - Analysis

3 - Steps

3.1 - Dump File System Information

Every file system has a way to dump file system information.

3.1.1 - du


3.1.2 - find

Example on Linux with the find command to list information recursively

# The header
echo "Relative_Path,Depth,Leading_Dir,Size_in_Byte,User_Name,Last_access_time,Last_change_time" > diskInfo.csv
# The data
find . -printf '"%p","%d","%h","%s","%u","%AY-%Am-%Ad","%CY-%Cm-%Cd"\n' >> diskInfo.csv



  • %p is the relative path (File’s name)
  • %d File’s depth in the directory tree; 0 means the file is a command line argument.
  • %h Leading directories of file’s name (all but the last element).


  • %k The amount of disk space used for this file in 1K blocks
  • %s File’s size in bytes.


  • %u is the user. File’s user name, or numeric user ID if the user has no name
  • %g is the group
  • %M and %m are permissions (respectively in symbolic form as ls and octal form)


  • %a is the File’s last access time. See %Ak to specify a date format. Example: %AY-%Am-%Ad - YYYY-MM-DD
  • %c is the File’s last status change time. See %Ck to specify a date format
  • %t File’s last modification time in the format returned by the C ‘ctime’ function.

3.2 - Analysis

Use any analysis tool such as:

  • R
  • Python