Created
May 22, 2023 18:15
-
-
Save kargaranamir/218b433fa08df3c43e2046f8c9f9d2d3 to your computer and use it in GitHub Desktop.
common 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
# remove empty folders in the current directory. | |
find . -type d -empty -delete | |
# flat folder in. folder | |
find . -type f -exec mv -i {} . \; | |
# delete other files that doesnot match: | |
find . ! -name "*-sentences.txt" -type f -delete | |
# grep over not txt: | |
ls -p | grep -v txt | |
# extract all tar files: | |
find path -name "*.tar.gz" -exec tar -xvf {} -C path \; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment