dcsimg
Linux Today: Linux News On Internet Time.




More on LinuxToday


3 Ways to Delete All Files in a Directory Except One or Few Files with Extensions

Oct 25, 2016, 06:00 (0 Talkback[s])
(Other stories by Aaron Kili)

Sometimes you get into a situation where you need to delete all files in a directory or simply cleanup a directory by removing all files except files of a given type (ending with a particular extension). In this article, we will show you how to delete files in a directory except certain file extensions or types using rm, find and globignore commands.

Complete Story