Last active
May 25, 2018 16:05
-
-
Save ravyg/a03cb3596ae1b0a8ca23287726958b29 to your computer and use it in GitHub Desktop.
General Unix Commands
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 the number of line in a file type recuresively. | |
find . -name '*.php' | xargs wc -l | |
# Find occurence on on word say "carrot" in many files. | |
grep -ir carrot . | wc -l | |
# This helps in moving files so keep backup!!! | |
# Moves files with json extension from sub-folders recursively to single output folder. | |
find <parent/folders/subfolders> -type f -name '*.json' -exec mv -i {} <new/folder> \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment