Discussion Forum

Welcome to the Discussion Forum, we encourage you to REGISTER on our forum and participate in the debate.For more details Click here

Online Advertising

Viewers now you can promote Your Websites/Blogs/Products by using our online advertising program.Using this feature you can place your Ads in my blog and can attract the people logging over here.To place your ads, just sign in my Guest Book and leave your details over there.

Friday, April 3, 2009

Unix Day4 Commands

find
program is a search utility, mostly found on Unix-like platforms. It searches through a directory tree of a filesystem, locating files based on some user-specified criteria. By default, find returns all files below the current working directory. Further, find allows the user to specify an action to be taken on each matched file. Thus, it is an extremely powerful program for applying actions to many files. It also supports regexp matching.
Examples
From current directory
This searches in the current directory (represented by a period) and below it, for files and directories with names starting with my. The backslash before the star is needed to avoid the shell expansion. Without the backslash, the shell would replace my* with the list of files whose names begin with my in the current directory. An alternative is to enclose the the arguments in quotes: find . -name "my*"
Files only find . -name "my*" -type f This limits the results of the above search to only regular files, therefore excluding directories, special files, pipes, symbolic links, etc. my* is enclosed in quotes as otherwise the shell would replace it with the list of files in the current directory starting with my echo is a command in Unix (and by extension, its descendants, such as Linux) and MS-DOS that places a string on the terminal. It is typically used in shell scripts and batch programs to output status text to the screen or a file. $ echo This is a test. This is a test. $ echo "This is a test." > ./test.txt $ cat ./test.txt This is a test.

No comments:

Post a Comment

Free advertising


Lowes Coupon
How to Blog

Free Advertising