Skip to content

Latest commit

 

History

History

ex02

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
Parameter Description
find . Starts the search from the current directory. (. -> current directory )
-type f Specifies that the search should only include files (not directories).
-name "*~" Matches files with names ending with ~.
-delete Deletes the matched files.
-print Prints the name of the deleted files (if any).
-o Logical OR. Allows multiple conditions to be combined in the search.
-name "#*#" Matches files with names starting and ending with #.
-delete Deletes the matched files.
-print Prints the name of the deleted files (if any).

This script, when executed, will recursively search for files in the current directory and its subdirectories. It will then delete files with names ending with ~ or starting and ending with #. It will print the name of each deleted file as it is deleted.