Created
May 12, 2021 11:49
-
-
Save amitk/60234ec3f0e2c73e72f228d515a09efc to your computer and use it in GitHub Desktop.
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
# It will delete all the files with there names matching the regex at once. | |
ls | grep <regex> | xargs rm | |
# eg. | |
# If we have files in our folder as "file.txt", "example.php", "new.html", "file_one.rb" | |
# For deleting files with "file" in their names just execute | |
# ls | grep file | xargs rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment