Monday, December 18, 2006

 

searching dir/sub directories (with wield chars) using find

find . -name "*.xml"

This will search for all xml files in a dir and sub dirs. the trick it so put it in quotes, when using wield charecters.

Thursday, December 14, 2006

 

CVS update command

cvs update -r -d

- if there is a compilation error in some java files, try deering the whole directory and running update CVS command again.

Friday, December 01, 2006

 

FIND in Unix

For example: find
will display all files in the current directory and all subdirectories.
The commands find . -print
find .
do the exact same thing. Here's an example find command using a search criteria and the default action: find / -name foo
will search the whole system for any files named foo and display them. Here we are using the criteria -name with the argument foo to tell find to perform a name search for the filename foo.

The output might look like this: /home/wpollock/foo

/home/ua02/foo
/tmp/foo
If find doesn't locate any matching files, it produces no output.
The above example said to search the whole system, by specifying the root directory ("/") to search. If you don't run this command as root, find will display a error message for each directory on which you don't have read permission. This can be a lot of messages, and the matching files that are found may scroll right off your screen. A good way to deal with this problem is to redirect the error messages so you don't have to see them at all: find / -name foo 2>/dev/null

http://www.hccfl.edu/pollock/Unix/FindCmd.htm

This page is powered by Blogger. Isn't yours?