I was under impression that
rm -r *.xml
would remove all file from parent and child however:
*.xml: No such file or directory
You can do this using the Windows GUI. Enter "*. wlx" in the search box in explorer. Then after the files have been found, select them all (CTRL-A) and then delete using the delete key or context menu.
To remove a directory and all its contents, including any subdirectories and files, use the rm command with the recursive option, -r . Directories that are removed with the rmdir command cannot be recovered, nor can directories and their contents removed with the rm -r command.
Using rm Command To remove a file with a particular extension, use the command 'rm'. This command is very easy to use, and its syntax is something like this. In the appropriate command, 'filename1', 'filename2', etc., refer to the names, plus their full paths.
The procedure to remove all files from a directory: Open the terminal application. To delete everything in a directory run: rm /path/to/dir/* To remove all sub-directories and files: rm -r /path/to/dir/*
The man page of rm says:
-r, -R, --recursive remove directories and their contents recursively
This means the flag -r
is expecting a directory. But *.xml
is not a directory.
If you want to remove the all .xml files from current directory recursively below is the command:
find . -name "*.xml" -type f|xargs rm -f
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With