Skip to content

Instantly share code, notes, and snippets.

@dlokesh
Last active December 9, 2015 22:18
Show Gist options
  • Save dlokesh/4336690 to your computer and use it in GitHub Desktop.
Save dlokesh/4336690 to your computer and use it in GitHub Desktop.
bash commands

Bash commands

replace in file

perl -p -i -e 's/oldstring/newstring/g' *
sed -i ‘s/oldstring/newstring/g’ *
find app/views/ -type f -exec perl -p -i -e 's/alert.unit/unit/g' {} \;

date format

date +"%m-%d-%y

find files greater than specified size

find / -type f -size +1G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment