Paired Bash Control Structures
if, while, until, for and case Paired? Yes, starts and ends with a tag.
-f checks if it is a regular file
-dcheck if the file is a directory
-echeck if the file exists
-fcheck if the file is a regular file
-gcheck if the file has SGID permissions ???
-rcheck if the file is readable
-scheck if the file's size is not 0
-ucheck if the file has SUID permissions
-wcheck if the file is write-able
-xcheck if the file is executable
if [ -f /etc/foo ]; then If-then control structure.
Finding and listing files with a string of interest in a directory and sub-directories.
find . -type f -exec grep "stringofinterest" {} \; -print References:
1. Tips for Linux: codecoffee.com
0 Comments:
Post a Comment