Help

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

What does ./ mean?

as in ./flashplayer-inastaller

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

It did... Thanx :smiley: :smiley: :smiley: :smiley: :smiley: :smiley:

Just to give more info :slight_smile: 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 :smiley: You might pick up Essential System Administration or UNIX System Administration Handbook. They'll be a big help.

Carl

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?

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

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.

:confused:

Hi Jimmy,

I was just wondering what it is your trying to achieve?
Depending on what you want to do with your system will determine which shell is best for you. The two main shell styles are Korn & C with many shells stemming from these, tcsh, bash, ksh etc.
I use the bash shell primarily.

ok, thanks :smiley: :smiley: :smiley: :smiley: :slight_smile:

If you check in one of the main threads, everyone has a personal preference. /bin/sh was the first popular shell. Korn shell (ksh) is an enhanced version and Bourne Again Shell (bash) is even more enhanced.

On Solaris, you'll probably use Korn shell and on Linux you'll probably use Bourne Again shell.

ls works because it's in your PATH (type which ls and it'll probably return /bin/ls). Unless you have a script called ls in your current directory, ./ls will not work. If you just type in "./", bash will just tell you that ./ is a directory.

If you type in ./[command], [command] has to be in the current directory. If you just type in [command], then [command] has to be in one of the directories identified by the PATH environment variable.

Carl

I navagated to the diectory usin' the "cd" cammand and typed ./flasplayer-installer
,and it said no such directery.

When u go to the the directory in Gui mode and the icon was A yellow cube thing on a paper.

Don't forget I use Mandriva Linux, and /bin/bash...

        Help??? :confused:  :confused:  :confused:

Which directory did you save the "flasplayer-installer" to?
Open up a new terminal session, cd into the directory you saved the file to.
In this directory now type, ls -l
It could be that your file has been tar'd or gzip'd, from wherever you downloaded from.
If the file is called flashplayer-installer.tar.gz (or similar), try this
tar -xvzf flashplayer-installer.tar.gz
This will extract the installer file to the current directory.
Do an ls -l once again to confirm the file is there.

The whole thing is actually called install_flash_player_7_linux.tar-1.

OK so cd into the directory where the file is then type
tar -xvf install_flash_player_7_linux.tar-1
It may extract to a new directory within your current directory. Just type ls -lrt and the extracted file or directory should appear at the bottom of the list with todays date and time close to current time.

It says command not found. :frowning:

OK, there could be 1 of 2 problems...

  1. Your system doesn't have the tar program
  2. Tar doesn't appear in PATH or PATH not setup correctly

Login to a shell session as root, type whereis tar
if tar isn't found it will return something like 'tar: '
if tar is found you should see something like 'tar: /bin/tar '

If tar is found then go back to your directory containing the flash installer tar file, and type
/path/to/tar -xvf install_flash_player_7_linux.tar-1
obviously replacing the /path/to/tar with the output from the whereis tar command.

It's found

/path/to/tar worked but it still said no such directory

Anyone here?

Use your mouse and capture the screen output and paste it here.

If you can't get that, type ls -l > output and tail -100 .bash_history >> output paste the file output to a post here.

Carl