File System - Analytics

Undraw File Manager Re Ms29

File System - Analytics

About

See also: Tree - Analysis

Steps

Dump File System Information

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

du

Disk usage

Linux - du (Disk Usage)

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

where:

Path:

  • %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).

Size:

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

User/Security

  • %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)

Time:

  • %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.

Analysis

Use any analysis tool such as:

  • R
  • Python

Disk Usage Tools

There are other disk usage tools that permit to analysis of a file system. See What are Disk Usage Tools? ( xdu tools)





Discover More
Undraw File Manager Re Ms29
What are Disk Usage Tools? ( xdu tools)

xdu Disk Usage tools or (du tools) are application that permits to visualize, analyze a disk. Note that disk means a file system that can be: logical (ie in the cloud with buckets) or semi-physical...



Share this page:
Follow us:
Task Runner