Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I do a ls in a folder, I sometimes get entries like:

a.txt*
b.txt
b.txt~

I believe:

~ means that it's a swap copy, however what does the * mean?

share|improve this question

migrated from stackoverflow.com Dec 20 '11 at 19:44

This question came from our site for professional and enthusiast programmers.

    
Could you run alias ls and send the output? –  Benjamin Goodacre Jun 25 at 10:42
add comment

3 Answers

Your ls seems to have an alias to ls -F. It shows the filetype:

* for executable
/ for directory
@ for symlink
| for fifo
= for socket
share|improve this answer
2  
@Thariq S: You might notice ~ is not listed here. It is a part of the file name, not just an indicator of type. –  choroba Dec 20 '11 at 21:04
add comment

It means that the file has execute permission.

See the "-F, --classify" option in the ls(1) man page. Depending on the shell configuration this info may be printed by "default" (say, if you have an alias ls="ls -F").

share|improve this answer
1  
Find out whether ls is aliased using type ls. –  Daniel Beck Dec 20 '11 at 19:52
add comment

ls -F appends a single character to a file name -

* executable
@ link 
/ directory
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.