Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Significance of * at the end of filenames?

Status
Not open for further replies.

evild

Technical User
Nov 25, 2002
71
0
0
GB
On my Solaris box i have a job list (like the cron) that calls certain scripts at certain times.

For example:
c_r_107 is called form my job list like this:

W1 09:06:00 Y CCC50 c_r_107

The rest of the line is irrelevant (local settings etc) but you can see the call simple enough.

The filename it is calling [c_r_107] has an asterix at the end of the filename in the directory it resides:
c_r_107*

and has some scipt in it:

eg

#!/bin/csh -f
sqlplus ****/****@/blah/blah/c_r_107.sql


I am wanting to create some new scipts to call from the job list but I am not sure about the significance of the asterix at the end of the filename. Can anyone explain?

 
Is there an asterisk when you just do a
Code:
 ls
?
I suspect that this trailing * is for denoting executable file, just like a trailing / for directory.

Hope This Help
PH.
 
Yes, when I do an ls the * is there. I wasnt sure if it was part of the filename or a unix flag of some sort.

I will do some testing on this though - trial and error will do fine :)
 
If the asterisk were part of the filename, the call in your job list shouldn't work, so it must be coming from somewhere else.

It sounds like ls is aliased to always use the -F option. Try using "\ls" and see if the asterisk is still there.
 
The astrick is an indication that the file has the execute attribute set,
i.e., before
ls -l test => -rw-r--r-- duane61 18 Sep 3 18:52 test
after chmod +x test
then
ls -l test => -rwxr-xr-x duane61 18 Sep 3 18:55 test*

other symbols are appended when you edit a file (saves the original file b4 edits), but then both files are present...
(however, only the latest file shows on an `ls' unless you use a wildcard...)

file~ = xemacs {modify and save changes}
file% = textedit {modify and save changes}

example:
ls test* => -rw-r--r-- duane61 18 Sep 3 18:52 test
-rwxr-xr-x duane61 18 Sep 3 18:55 test2*

xemacs test ...
textedit test2 ...

results in:
ls test* => -rw-r--r-- duane61 18 Sep 3 18:52 test
-rw-r--r-- duane61 18 Sep 3 18:52 test~
-rwxr-xr-x duane61 18 Sep 3 18:55 test2*
-rwxr-xr-x duane61 18 Sep 3 18:55 test2%*

Hopefully, that is clear enough! Give it a try :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top