Monday, May 13, 2024
108
rated 0 times [  108] [ 0]  / answers: 1 / hits: 398850  / 2 Years ago, sat, august 6, 2022, 8:20:27

I tried executing a script with this command:


./home/user/scripts/someScript

but it doesn't work:


No such file or directory

Any ideas?


More From » command-line

 Answers
5

The leading dot in your command means "relative to the current directory". Remove it and it'll refer to "the file someScript in the directory /home/user/scripts:



/home/user/scripts/someScript


If you get "Permission denied", it's either because you do not have sufficient permissions to access the file in the directory of other users or because the file is not executable. To make it executable, run:



chmod +x /home/user/scripts/someScript

[#42354] Sunday, August 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
beateyra

Total Points: 499
Total Questions: 113
Total Answers: 125

Location: Falkland Islands
Member since Mon, Jul 13, 2020
4 Years ago
;