Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Shell/Bash
bash delete everything except
Nadeen
Programming language:
Shell/Bash
2021-03-24 20:50:49
6
Q:
bash delete everything except
anonymoo
Code:
Shell/Bash
2021-02-07 18:20:21
# delete all except the filename $ rm -v !("filename")
1
machinery
Code:
Shell/Bash
2021-01-19 01:58:29
$ rm -v !("filename1"|"filename2")
0
Related
bash remove first character from line
bash delete folder
bash how to remove rows if specific field is blank
bash delete file
delete a directory bash script
bash remove duplicate lines from a file
bash how to remove the first n lines of a file
bash delete first n characters of each line
bash how to delete ^M at the end of every line
bash remove rows that are found in another file
bash history delete entry
bash how to remove all whitespace from a file
bash remove characters from end of every line
bash how to delete a specific line from a file
bash delete the last line of a file
bash remove directory
New to Communities?
Join the community