search path

Asked by princen

I am new in making scripts in ubuntu and i will really appreciate some help with this question

how do i Create a directory in my home directory and move the script called "hello world" after it has been made to a new directory.
how do i Permanently add this new directory to my search path.
how do i Test that the script can be executed without giving a path to its actual location.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Jim Hutchinson
Solved:
Last query:
Last reply:
Revision history for this message
Best Jim Hutchinson (jphutch) said :
#1

I don't fully understand all your questions but I'll do my best.

To make a new directory you can use the file browser and just right click-create folder but if you are looking for terminal commands it's mkdir.

mkdir new
mkdir /home/username/Desktop/new
mkdir ~/Documents/new

~/ is shorthand for /home/username

To move your hello_world script use mv. Assuming it's in your /home and you want to move it to /home/username/Documents/new use

mv ~/hello_world ~/Documents/new

I'm afraid I don't know what you mean about search path or executing without a path. It might have something to do with symbolic links but I've never messed with those.

Revision history for this message
princen (spurchampion) said :
#2

Thanks Jim Hutchinson, that solved my question.