using find command in linux

Find and xargs are two most useful command.

find where-to-find criteria what-to-do

1. apply a command to all files find:

find ./ -name getTh\* -exec svn add “{}” \;

will find a file starting with getTh and add to svn.

2. using with xargs

eg. find / -name core | xargs /bin/rm 0f

will remove all core files from system

About these ads

About xzhou
I am a second year Ph D student studying at School of Informatics, Indiana University. My research interests includes malware detection, data security and network security.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.