Help


 
Thread Tools Search this Thread
Operating Systems Linux Help
# 1  
Old 08-26-2006
Error what does ./ mean?

I have Mandriva Linux, and I need help...

What does ./ mean?

as in ./flashplayer-inastaller

Last edited by Irish Jimmy; 08-26-2006 at 07:10 PM..
# 2  
Old 08-26-2006
Hi irish-jimmy,

When told to run ./someprogram
it basically means that you are in the same directory as that program.
e.g. if i had a script in my home dir i would firstly cd into that directory
cd /home/gareth/test
and then run my program by typing ./someprogram

hope that helps
# 3  
Old 08-26-2006
Computer

It did... Thanx Smilie Smilie Smilie Smilie Smilie Smilie
# 4  
Old 08-26-2006
Quote:
Originally Posted by Irish Jimmy
I have Mandriva Linux, and I need help...

What does ./ mean?

as in ./flashplayer-inastaller
Just to give more info Smilie A period is a shortcut for the current directory. Two periods is a shortcut for the parent directory or one directory closer to the root directory (aka /). If you type ls . you'll get a listing of the current directory. If you type ls .., you'll get a listing of your parent directory.

When you run a command such as flashplayer-installer, your shell will prepend each of the colon separated paths located in your PATH environment variable to the beginning of your command.

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

/bin/flashplayer-installer
/sbin/flashplayer-installer
/usr/bin/flashplayer-installer
/usr/sbin/flashplayer-installer
/usr/local/bin/flashplayer-installer

So the command won't run because the location where the flashplayer-installer is installed isn't in your path.

Most professional sysadmins don't have period in their path to keep from someone putting a trojaned script with the same name as an available command in a directory you may be currently working in. Although some installations (AIX for example) have period in the path by default.

So if the command isn't in your path, you need to specify it along with the command.

You could type /home/jimmy/flashplayer-installer and the command would run, or you can just use the shortcut for the current directory and type in:

./flashplayer-installer

I try to do the "teach a man to fish" vs "give him a fish" replies Smilie You might pick up Essential System Administration or UNIX System Administration Handbook. They'll be a big help.

Carl
# 5  
Old 08-27-2006
Question

When i type /s or try the ./ thing it says No such directory.

I'm usin' /bin/bash:
I have a choice:

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
bin/tcsh

Which one should i use?
# 6  
Old 08-27-2006
If you cd into your directory
cd /yourdirectoryname
then type
ls
you will see a directory & file listing of the current directory.
There are many more options with ls such as listed by date created, name etc.
As Carl mentioned, you can get a listing of your parent directory by typing
ls ../

You should also see a . and .. in your directory listing.
The . represents the current directory, and .. represents the parent directory.

Take this for example, cd /prg/tocc/scripts
I then want to run my script
[ prg/tocc/scripts#]./myscript
I use ./ as my script is in the current directory.

If, for example, I want to run my script but put my output to a text file in the parent directory, I would do the following.

[ prg/tocc/scripts#]./myscript > ../mylog.txt
# 7  
Old 08-27-2006
Bug

I'm usin' /bin/bash:
I have a choice:

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
bin/tcsh

Which one should i use?

Ok "ls" worked, but ./ isn't.

Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question