This is an old revision of the document!
File Management
Managing files with common CLI tools rsync
, mv
, cp
, scp
etc.
cp
# trailing slash affects whether source gets copied or not cp -r ./old_dir ./new_dir # will copy old_dir into new_dir cp -r ./old_dir/ ./new_dir # will copy everyhing inside old_dir to new_dir
scp
# unlike cp trailing slash does not have affect. scp will always copy the source_dir scp -rP 2222 kalenpw@kalenpw.com:/path/to/file.txt ./dest_file