Article 521P2 running a bash file from different directory

running a bash file from different directory

by
hnasr2001
from LinuxQuestions.org on (#521P2)
I have a bash script called bash.sh in the
/home/operator/Desktop/Python/backup/ directory.

I have added the path to the $PATH

[operator@localhost backup]$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/operator/.local/bin:/home/operator/bin:/home/operator/Desktop/Python/backup/

From the same directory, I can run the file without adding "./"

How can I run the script from different directory just by typing its name

Thankslatest?d=yIl2AUoC8zA latest?i=dnoGTKrOrCQ:IRhqBeZhomc:F7zBnMy latest?i=dnoGTKrOrCQ:IRhqBeZhomc:V_sGLiP latest?d=qj6IDK7rITs latest?i=dnoGTKrOrCQ:IRhqBeZhomc:gIN9vFwdnoGTKrOrCQ
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments