Home » Linux rm *extension

Linux rm *extension

by Online Tutorials Library

Linux rm *extension

This command can be used to remove all the files ending with same extensions like .pdf, .txt, .odt, .png, etc.

Syntax:

Example:

Here, we are removing two directories having same extension ‘.txt’. Let’s have a look.

Linux rm Extension

As you can see both the directories ‘demo.txt’ and ‘Demo.txt’ have been deleted. You can remove as many files as you want having same extensions.

Next TopicLinux rm -r

You may also like