Find command

Hello Every one,

I am looking for a command in linux where I need to to find and delete numerical files of home directory using find cmd.....

Sorry for a newbie question..:smiley:
:slight_smile:

What do you mean by "numerical files"? Mind giving us an example? Perhaps something like this?:

find /home -type f -regex '[0-9][0-9]*'

Thanks for the reply,

I have few folders and files names like 1,2,3,4

I need to delete them using find command, sorry its for knowledge and not just for the sake of deleting the files :slight_smile:
Just curious how to delete them using find command

In any case, you'll end up using "rm" command. You just need to tell "find" to issue the command on each and every line it finds.

Try using "-exec" or "-ok" options. Here's an example:

find ...blah blah blah... -exec rm -rf {} \;