I have a script named script.sh
. I don't know where it is in the file system, but I do know it exists.
How do I find the script, make it executable, and run it all in one line through the command line?
I would like to run it with a single command. Find, make executable and execute.
Best Answer
Use the
find
command for it in your home:If you didn't find anything with the above, then use the
find
command for it on the whole F/S:(
2>/dev/null
will avoid unnecessary errors to be displayed) .Launch it:
And all at once would give; more on how to find and exec:
(beware if you have more than one "
script.sh
", it will run them all)