This Blog primarily focus on providing solutions for administering Linux Operating system in Enterprise environment. I have put my best effort to ensure the solutions provided in this are accurate, easy to follow, effective, and helpful for Linux Users & System Administrators.
'compgen' is a handy Bash built-in command to list all the Commands, Aliases and Bash Built-ins functions available for a logged-in user. To list all the commands : compgen -c To list all the Aliases : compgen -a To list all the Bash Built-ins : compgen -b
Below given is the recommended Rsync syntax which can be used to sync 2 file-systems. However appropriate options can be chosen based on the requirement: Source machine# nohup rsync -atlrzvuop --progress /<source folder>/ <Destination IP/Hostname>:/<Dest folder>/ & -a : Archive mode -t : Preserve modification time -l : Preserve symbolic links -r : Copy recursively -v : Verbose -z : Zip the files before transfer -u : Skips files which exist on the destination and have a modified time newer than the source file. -p : Preserve permissions -o : Preserve owner --bwlimit=<kpbs> : To control the I/O bandwidth if you are syncing across WAN (e.g. --bwlimit= 30000 - to sync at 30 Mbps) --delete : Delete all the extra files on Destination which aren’t present in the Source. --exclude=<pattern> : Exclude files from syncing whose filenames matching the PATTERN (e.g. --exclude=.zip )