Next | Prev | Up | Top | Contents | Index

Recursive Commands Under IRIX

Recursive commands can save you a lot of time. For example, to change the ownership of all the files and directories in a directory recursively, and all of the files and directories in all of the subdirectories below that, you can use the recursive option with chown(1):

chown -R username directory

Some of the other commands in the IRIX system that have recursive options are:

ls -R

rm -r

chgrp -R

If you want to use a particular command recursively, but it does not have a recursive option, you can run the command using find. See "Using find to Locate Files".

Note that using recursive options to commands can be very dangerous in that the command automatically makes changes to your files and file system without prompting you in each case. The chgrp command can also recursively operate up the file system tree as well as down. Unless you are sure that each and every case where the recursive command will perform an action is desired, it is better to perform the actions individually. Similarly, it is good practice to avoid the use of metacharacters (described in "Using Regular Expressions and Metacharacters") in combination with recursive commands.


Next | Prev | Up | Top | Contents | Index