ffsl - Linux
Overview
ffsl (Fast File System Lister) is a command-line utility designed for rapidly listing all files and directories within a specified directory in a structured, hierarchical format. It’s particularly useful for visualizing the file system structure and identifying files quickly.
Syntax
ffsl [options] [directory]
Options/Flags
- -a, –all: List all files, including hidden ones (starting with a dot).
- -d, –depth
: Limit the depth of the file system traversal to the specified level. - -f, –filename-only: Display only the filenames, without any additional information.
- -g, –group-by-extension: Group files by their extensions.
- -h, –help: Display help message.
- -l, –long-format: Display additional file information, including file size, modification time, and permissions.
- -m, –max-depth
: Limit the maximum depth of the file system traversal to the specified level. - -q, –quiet: Suppress all output except for errors.
- -r, –recursive: Recursively traverse subdirectories.
- -s, –sort-by: Sort the output by the specified criteria:
- size
- name
- modification time
- extension
- -u, –unique: Display only unique files, ignoring duplicates.
Examples
List all files in a directory without hidden files:
ffsl /path/to/directory
List all files and directories in a directory recursively with filename only:
ffsl -ar -f /path/to/directory
List all files grouped by extension:
ffsl -g /path/to/directory
Common Issues
- Permission denied: Ensure you have sufficient permissions to access the specified directory.
- Directory not found: Verify that the specified directory exists and is accessible.
Integration
Combine with find to locate specific files:
find /path/to/directory | fgsl -s name
Use with xargs to delete files:
ffsl -r /path/to/directory | xargs rm
Related Commands
- ls: Lists files and directories in a directory.
- find: Searches for files and directories based on various criteria.
- du: Estimates file system disk usage.
- tree: Visualizes file system structure in a tree-like format.