I have a folder /home/userA/folderA
this folder contains many files and folders and subfolders. What I want to do is to delete all files that have certain names data.txt
and glass.txt
. I also want to delete any folder named match
with all its contents. I'd be thankful for any advice in how to do this.
Ubuntu – Delete files and folders with specific name from a certain directory
command line
Best Answer
You can delete the files and folders in the subdirectories of
folderA
.To remove the files, run:
and to remove the folders
match
: