Click to See Complete Forum and Search --> : Seeing Stars


PunkTiger
04-13-2001, 10:06 PM
OK, I admit I was too lazy to comb through the 17+ pages of posts in this one forum to find a similar problem, but this is a real head-scratcher for me (Linux newbie that I am).

Short version: Can someone explain the significance of an asterisk at the end of a filename when I ls -al a directory?

For example, I have a few files in my directory that look like:

-rwxrwxrwx 1 punktigr punktigr 82055 Mar 19 20:08 umigasuki.jpg*
-rwxr-xr-x 1 punktigr punktigr 167472 Mar 23 20:53 tf*

I can display the jpg without a problem. The "tf" file is TinyFugue, a MUSH/MUCK/MOO program. I've tried installing it a few times, but whenever I try to run it, bash comes back saying bash: tf: command not found. It's not a shell script, as bash will come back with tf: tf: cannot execute binary file. That's also happened with another program I tried installing that also came up with that asterisk in the ls listing. Yet, other programs I've installed/compiled before and after have worked fine.

So, why am I seeing stars?? :confused:

Info: I'm running Mandrake 7.2 (2.2.17-21mdk), dedicated 10 gig HD (tons o' free space), P3 560, 384 megs memory... other info available on request.

Peace;
- PunkTiger!

Derango
04-14-2001, 06:57 AM
When you try to run tf, try the command ./tf while you're in the directory that tf is located in. As for the *'s, it beats me

PunkTiger
04-14-2001, 08:47 AM
I am SUCH an idiot! :o The program wasn't in a directory specified by the PATH. Seems that Mandrake included a directory called /home/punktigr/bin (that didn't exist), but not /home/punktigr. I created the /bin directory and moved the file there. Wonder of wonders, it now works. Let's hear it for echo $PATH.

The filename still has the asterisk tacked on it (I don't type it in, tho) and I'm still interested in the significance of it. But, now I know that wasn't the problem. I just forgot to include the variable: USER=ID10T.

Thanx for the help anyway, Derango. :)

[ 14 April 2001: Message edited by: PunkTiger ]

Nalle
04-15-2001, 09:35 AM
The reason for the star, as you call it is simply to inform you that this file has been set to be executable. It's got nothing to say wether or not the code in the file is binary or some kind of script.

Actually it doesn't even matter if the file contains any executable code at all.

It's very useful if you run the command:

ls --color=none

then it will still show you the star, so you can, by a glance, know what files are executable. Now you will probably never need that command, but if you change user with 'su', you might loose the colors when running ls.

Do the following exercise:

Create a emty file by typing:

touch somefile.txt

This will create a empty file.

Make it executable by typing:

chmod 755 somefile.txt

Do a:

ls -l somefile.txt

To view the result (the file _will_ have your star).

Now, do:

chmod 666 somefile.txt

Now you can read from it and write to it, but not run it - and; NO STAR

PunkTiger
04-15-2001, 02:32 PM
Ah! Well... Fancy that.

Another Great Mystery o' Life (tm) has been revealed to me. I wonder why all the books I have on Linux never mention that? Regardless, it's stored in my memory bank.

Thanks very much, Nalle! I'll get the hang of this Linux thing yet! :D

Nalle
04-15-2001, 05:55 PM
Heh, if you've got Running Linux from O'Reiley, it's written in there somewhere.

The command 'man chmod' will also tell you much about this.

In the whole, man is _allways_ good if you only know the command. It might be a bit technical for newbies, though...


Other reading (downloadable) can be found at:
http://www.linuxdoc.org/guides.html

The html and pdf -books on this site can tell you allmost everything. They got me started (odd as it might sound, that was back in 1995, when I installed Slackware 2.x,something - it was 50MB big and I took it down via modem - took me all night, that did)