GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
mapdir(1) Manpage for mapdir mapdir(1)

mapdir - Map directory structures

mapdir [-dfhnpt] [-e excludes] [-s savefile] [-x excludes_file] [/path/to/file]

The mapdir utility is used to map the structure of files and most notably folder hierarchies. Unless overridden with the -n or -s options, the results are stored in a report file in the invoking user's home directory, according to the following naming convention: mapdir_path_to_file_date.txt. If the file mapped is a regular file, then mapdir also reports its size in bytes and the file's md5 or sha256 checksum. If upon invocation no argument is passed to mapdir, then the utility maps the structure of the current working directory.

The utility mainly aims to facilitate verifying the consistency between two (or more) file hierarchies that contain the same files, as the generated report files can subsequently be passed to the diff(1) utility. When using mapdir to this end, it should generally be invoked with the -f switch.

only parse non-hidden files.
list of files to be excluded.
omit reporting the name of the starting directory in the report file.
use the sha256 message digest instead of md5.
only print to stdout, i.e. don't generate a savefile. This option overrides the -s option.
print a tree view of the directory. This option requires the -f option to work and won't work with the -e or -x switches activated.
save the report in ${HOME}/savefile.
generate a statistical report of the kinds of files mapped.
read the files to be excluded from excludes_file. Entries are expected to contain the full path to file and are read line by line.

1. Verify the consistency between /path/to/dir1 and /path/to/dir2:

mapdir -fh -s dir1_map.txt /path/to/dir1
mapdir -fh -s dir2_map.txt /path/to/dir2
diff ~/dir1_map.txt ~/dir2_map.txt

2. Map the structure of /path/to/dir in a tree like view to stdout:

mapdir -fnp /path/to/dir

3. Map the structure of /usr but exclude directories /usr/games and /usr/include:

mapdir -s usr_directory.txt -e "/usr/games /usr/include" /usr

mapdircmp(1)

Please report when found.

Oliver Mahmoudi (contact@olivermahmoudi.com)

April 2020 mapdir 1.2.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.