AUFS-FIND(1)

NAME
aufs-find - Find files by which aufs branch(es) they are in

SYNOPSIS
aufs-find -h
aufs-find [-b branch_list] [-c branch_count[+|-]] [-a] [-f] [-r] [-s] folder_path

DESCRIPTION
The aufs-find script searches for files in a given folder in an aufs filesystem using the find command. It provides filters to search by: • which numbered branches the file is in, or
• the total count of branches that contain versions of the file.

Here "files" includes file-like objects: symlinks, named pipes and sockets.

OUTPUT
The output of aufs-find is in three columns, separated by tabs. You might like to expand and align the output by piping to column -t.

From left to right, the columns are: • an integer count: how many branches the file was found in;
• a comma-separated list of the branch numbers in which the file was found;
• the full path of the file.

If the -s option is given, the second column (list of branch numbers) is omitted.

OPTIONS
Where an option requires an argument, the space before the argument is optional. For example, -b1,4 and -b 1,4 are equivalent.

-a  Find files in all branches with no filtering, regardless of how many branches they appear in. This option completely overrides -b and -c.

-b branch_list
    Filter to only consider files that are in one or more of the branches in branch_list. branch_list is a comma-separated list of integers (branch numbers) with no spaces. The branch numbers can be found by running aufs-list /.

-c n[+|-]
    Filter based on the branch count, or how many branches the file is present in. If the -b argument is given, then the branch count is calculated only within those branches given in the branch-list.
    If the argument is an integer n, display only files whose branch count is exactly n.
    If the argument is of the form n+, display only files whose branch count is n or more.
    If the argument is of the form n-, display only files whose branch count is n or less.

-h, --help
    Display a short help message and exit. (The help message is also displayed when aufs-find is called with no arguments.)

-f  List only real files. Ignore symlinks, named pipes and sockets.

-r  Find files recursively in folder_path and all its subfolders.

-p  Parallel processing. The find commands for each branch will be run in parallel as background jobs, which will improve performance in some cases. This option has no effect if the -s option is given.

-s  Short output. The output will contain only two columns: the branch count and the file path. The list of branches will not be shown. aufs-find can run faster when this option is given.

NOTES

You may need to run aufs-find as root, if your current user does not have read access to some of the files within folder_path.

The folder_path must be in the aufs file system. If the -r option is given, and a subfolder of folder_path contains a mount of a non-aufs file system, then this will not cause any error, but the script will waste time searching for files in the branches which are unlikely to exist.

Some Linux distributions (e.g. Slax) mount the same aufs file system more than once, creating an effect similar to a symlink. The output of the mount command will reveal whether this is the case for you. Currently, if you run aufs-find with the recursive option -r on a parent folder of the secondary aufs mount, the output will not include files within the secondary mount. You can view those files by running aufs-find again on the secondary mount folder.

EXAMPLES

aufs-find -c2+ -r -s /home/guest

    Find files in /home/guest and its subfolders which exist in 2 or more branches of the aufs filesystem. Give short (two-column) output.

aufs-find -b 0,1,3 -c 3 -r /usr/bin

    Find files in /usr/bin that are in all three of the branches numbered 0, 1 and 3.

REPORTING BUGS

Please report any bugs or other issues on the Codeberg repository: https://codeberg.org/lcpterid/aufs-dir-tools/

AUTHORS
lcpterid

SEE ALSO
aufs-list(1), aufs-diff(1), aufs-clashes(1), aufs-revert(1), aufs-unwh(1)