How do you test for file properties in shell scripts?
Answer / chaitanya
-s filename tells you if the file is not empty, -f filename tells you whether the argument is a file, and not a directory, -d filename tests if the argument is a directory, and not a file, -w filename tests for writeability, -r filename tests for readability, -x filename tests for executability
| Is This Answer Correct ? | 1 Yes | 0 No |
How do you refer to the arguments passed to a shell script?
How do you search for a string in a directory with the subdirectories recursed?
How do you test for file properties in shell scripts?
How do you find out what’s your shell?
How do you read keyboard input in shell scripts?
How do you do number comparison in shell scripts?
How does a case statement look in shell scripts?
What’s the conditional statement in shell scripting?
What’s a way to do multilevel if-else’s in shell scripting?
How do you count words, lines and characters in a file?
How do you fire a process in the background?
How do you stop a process?