Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Copy a dir X recursively into destination/X
- # This helps to recreate the SRCDIR (plus all its files and/or subfolders) inside DESTDIR/SRCDIR (plus all its files and/or subfolders)
- # Use the following alias cpdir that uses rsync as follows:
- alias cpdir='rsync -iruv --ignore-existing'
- # Copy a folder as follows
- cpdir /path/to/SRCDIR /path/to/DESTDIR/
- # NOTE:
- 1. Do NOT include the trailing backslash of /path/to/SRCDIR
- 2. DESTDIR must include a backslash i.e /path/to/DESTDIR/
- # EXAMPLE
- - To recreate dir assist (from sdcard/assist) within ~/tmp, do
- cpdir /sdcard/assist ~/tmp/
- - Note that /sdcard/assist has NO "/" BUT ~/tmp/ does!!
- - ~/tmp will now become ~/tmp/assist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement