What is the difference between: test1, .test1, ./test1, . test1, . ./test1 You h
ID: 3707314 • Letter: W
Question
What is the difference between: test1, .test1, ./test1, . test1, . ./test1 You have a file called "test1" in your current directory. It is readable and executable. What happens when you type each of the following at the command line (will it run, will it be in a subshell - in general, what are the differences between these?): test1 .test1 (there is no space between the dot and the first "t") ./test1 . test1 (there is one space between the dot and the first "t") . ./test1 (there is a space between the two dots)
Explanation / Answer
test1.test1 > It will return like "Command not found"
Bash will check for a valid command. in this test1 is not a valid command. so it will return as "Command not found"
./test1.test1 > It will return like "No such file or directory"
after ./ file name should be given to execute. test1.test1 is not a file, so it will return "No such file or Directory" error.
../test1> It will return like "No such file or directory"
./ will be used to execute the .sh files. ../ will always give the error like "No such file or directory"
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.