Last active
January 1, 2016 15:18
-
-
Save ammist/46f6deec26e95ef2ef6b to your computer and use it in GitHub Desktop.
find files newer than [filename] and copy them to [dirname]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -newer '[filename]' -print0 | xargs -0 -I {} cp {} [dirname] | |
# replace strings in a file without creating a backup. the -i parameter would create a backup if you so desired | |
sed -i '' 's/techliminal/localhost/g' [filename] | |
# find all the javascript files and list them | |
find . -name *.js -print | xargs ls -l | |
# change the owner of all the javascript files | |
# Looks like the sudo has to be on the xargs / chown part of the operation | |
find . -name *.js -print | sudo xargs chown anca:www-data | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment