Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hardlink(1) [centos man page]

hardlink(1)						      General Commands Manual						       hardlink(1)

NAME
hardlink - Consolidate duplicate files via hardlinks SYNOPSIS
hardlink [-c] [-n] [-v] [-vv] [-h] directory1 [ directory2 ... ] DESCRIPTION
This manual page documents hardlink, a program which consolidates duplicate files in one or more directories using hardlinks. hardlink traverses one or more directories searching for duplicate files. When it finds duplicate files, it uses one of them as the mas- ter. It then removes all other duplicates and places a hardlink for each one pointing to the master file. This allows for conservation of disk space where multiple directories on a single filesystem contain many duplicate files. Since hard links can only span a single filesystem, hardlink is only useful when all directories specified are on the same filesystem. OPTIONS
-c Compare only the contents of the files being considered for consolidation. Disregards permission, ownership and other differ- ences. -f Force hardlinking across file systems. -n Do not perform the consolidation; only print what would be changed. -v Print summary after hardlinking. -vv Print every hardlinked file and bytes saved. Also print summary after hardlinking. -h Show help. AUTHOR
hardlink was written by Jakub Jelinek <jakub@redhat.com>. Man page written by Brian Long. Man page updated by Jindrich Novy <jnovy@redhat.com> BUGS
hardlink assumes that its target directory trees do not change from under it. If a directory tree does change, this may result in hardlink accessing files and/or directories outside of the intended directory tree. Thus, you must avoid running hardlink on potentially changing directory trees, and especially on directory trees under control of another user. hardlink(1)

Check Out this Related Man Page

ARCHIVE_ENTRY_PATHS(3)					   BSD Library Functions Manual 				    ARCHIVE_ENTRY_PATHS(3)

NAME
archive_entry_hardlink, archive_entry_hardlink_w, archive_entry_set_hardlink, archive_entry_copy_hardlink, archive_entry_copy_hardlink_w, archve_entry_update_hardlink_utf8, archive_entry_set_link, archive_entry_copy_link, archive_entry_copy_link_w, archve_entry_update_link_utf8, archive_entry_pathname, archive_entry_pathname_w, archive_entry_set_pathname, archive_entry_copy_pathname, archive_entry_copy_pathname_w, archve_entry_update_pathname_utf8, archive_entry_sourcepath, archive_entry_copy_sourcepath, archive_entry_symlink, archive_entry_symlink_w, archive_entry_set_symlink, archive_entry_copy_symlink, archive_entry_copy_symlink_w, archve_entry_update_symlink_utf8 -- functions for manip- ulating path names in archive entry descriptions LIBRARY
Streaming Archive Library (libarchive, -larchive) SYNOPSIS
#include <archive_entry.h> const char * archive_entry_hardlink(struct archive_entry *a); const wchar_t * archive_entry_hardlink_w(struct archive_entry *a); void archive_entry_set_hardlink(struct archive_entry *a, const char *path); void archive_entry_copy_hardlink(struct archive_entry *a, const char *path); void archive_entry_copy_hardlink_w(struct archive_entry *a, const, wchar_t, *path"); int archive_entry_update_hardlink_utf8(struct archive_entry *a, const char *path); void archive_entry_set_link(struct archive_entry *a, const char *path); void archive_entry_copy_link(struct archive_entry *a, const char *path); void archive_entry_copy_link_w(struct archive_entry *a, const wchar_t *path); int archive_entry_update_link_utf8(struct archive_entry *a, const char *path); const char * archive_entry_pathname(struct archive_entry *a); const wchar_t * archive_entry_pathname_w(struct archive_entry *a); void archive_entry_set_pathname(struct archive_entry *a, const char *path); void archive_entry_copy_pathname(struct archive_entry *a, const char *path); void archive_entry_copy_pathname_w(struct archive_entry *a, const wchar_t *path); int archive_entry_update_pathname_utf8(struct archive_entry *a, const char *path); const char * archive_entry_sourcepath(struct archive_entry *a); void archive_entry_copy_sourcepath(struct archive_entry *a, const char *path); const char * archive_entry_symlink(struct archive_entry *a); const wchar_t * archive_entry_symlink_w(struct archive_entry *a); void archive_entry_set_symlink(struct archive_entry *a, const char *path); void archive_entry_copy_symlink(struct archive_entry *a, const char *path); void archive_entry_copy_symlink_w(struct archive_entry *a, const wchar_t *path); int archive_entry_update_symlink_utf8(struct archive_entry *a, const char *path); DESCRIPTION
Path names supported by archive_entry(3): hardlink Destination of the hardlink. link Update only. For a symlink, update the destination. Otherwise, make the entry a hardlink and alter the destination for that. pathname Path in the archive sourcepath Path on the disk for use by archive_read_disk(3). symlink Destination of the symbolic link. Path names can be provided in one of three different ways: char * Multibyte strings in the current locale. wchar_t * Wide character strings in the current locale. The accessor functions are named XXX_w(). UTF-8 Unicode strings encoded as UTF-8. This are convience functions to update both the multibyte and wide character strings at the same time. The sourcepath is a pure filesystem concept and never stored in an archive directly. For that reason, it is only available as multibyte string. The link path is a convience function for conditionally setting hardlink or sym- link destination. It doesn't have a corresponding get accessor function. archive_entry_set_XXX() is an alias for archive_entry_copy_XXX(). SEE ALSO
archive(3), archive_entry(3) BSD
February 2, 2012 BSD
Man Page