Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Usless use of cat . . .' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Usless use of cat . . .
Authored by: Anonymous on Mar 13, '01 07:04:59PM

As you become more experienced with UNIX you
will (perhaps) hear of 'the useless use of cat' argument.
The previous was a good example of it. Why not just:

% chmod -R 777 .
# chmod EVERYTHING, with recursion, to 777 from the current location, then
% find . -type f -exec chmod 666 {} \\;
# find all FILES chmod to 666 [ the '\\;' is required, read about it with 'man find']
# foreach file find puts the filename where the '{}' curly braces are and executes the
# command. Very elegant and powerful. BTW: it took 4 slashes in this editor to print a
# single backslash like this '\'



[ Reply to This | # ]