Skip to content
/ cpmv Public

move a directory to a new location by copying its data

License

Notifications You must be signed in to change notification settings

dim-geo/cpmv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

#cpmv

Moving directories in the same filesystem does not copy data. It just changes a pointer. Sometimes this is not desirable. You may need to copy data first and then delete destination, but by using 'cp & rm -rf' you double temporarily free space requirements. cpmv performs that by operating on a per file basis, instead of copying the whole structure in advance. This is useful for btrfs/zfs when you change mount options (for example compress in btrfs) or move data across filesystems on the same tank (zfs)

requirements: bash version 4 or higher, stat

usage: cpmv source_directory target_directory

target directory must not exist! Permissions & modification times are preserved for directories & files.

About

move a directory to a new location by copying its data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages