Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
mapdir(1)		       Manpage for mapdir		       mapdir(1)

NAME
     mapdir - Map directory structures

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

DESCRIPTION
     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 re-
     sults 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.

OPTIONS
     -d     only parse non-hidden files.

     -e excludes
	    list of files to be excluded.

     -f     omit  reporting  the  name	of  the starting directory in the report
	    file.

     -h     use the sha256 message digest instead of md5.

     -n     only print to stdout, i.e. don't generate a  savefile.  This  option
	    overrides the -s option.

     -p     print  a tree view of the directory. This option requires the -f op-
	    tion to work and won't work with the -e or -x switches activated.

     -s savefile
	    save the report in ${HOME}/savefile.

     -t     generate a statistical report of the kinds of files mapped.

     -x excludes_file
	    read the files to be excluded from excludes_file.  Entries	are  ex-
	    pected to contain the full path to file and are read line by line.

EXAMPLES
     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

SEE ALSO
     mapdircmp(1)

BUGS
     Please report when found.

AUTHOR
     Oliver Mahmoudi (contact@olivermahmoudi.com)

mapdir 1.2.1			   April 2020			       mapdir(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mapdir&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help