You are here

some file management commands

sometimes we need to know how to manage files from the command line. the usual cohort includes cp, rm and mv but what kind of extended commands are out there for us to use?

fdupes is a program that finds duplicate files and it is available in the epel repo

fdupes -R -d /path/to/dir1 /path/to/dir2

where -R tells it to search recursively and -d to delete (it asks you first which to keep)

cp -rn /path/1 /path/2

where -r is recursive, meaning copy directories and -n means no clobber, meaning do not overwrite

find . -iname desktop.ini -delete

where -iname means to ignore capitalisation and -delete means to delete without confirmation