Skip to content

Instantly share code, notes, and snippets.

@MeenachiSundaram
Last active December 24, 2016 09:29
Show Gist options
  • Select an option

  • Save MeenachiSundaram/23ea129e72e2208a0eaae66e6e18d967 to your computer and use it in GitHub Desktop.

Select an option

Save MeenachiSundaram/23ea129e72e2208a0eaae66e6e18d967 to your computer and use it in GitHub Desktop.
Unix Commands to be remembered
## rsync files
rsync -av --progress sourcefolder /destinationfolder --exclude thefoldertoexclude
## Check If file exist and do
#!/bin/bash
file="/etc/hosts"
if [ -f "$file" ]
then
echo "$file found."
else
echo "$file not found."
fi
## TimeStamp
echo $(date +"%d-%m-%Y-%H:%M:%S")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment