LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-15-2013, 08:38 AM   #1
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Rep: Reputation: 2
what do @ and * mean when found after directory entries?


and for that matter, to obviate need for further questions in that
direction, how do configure konsole (my current fav emulator of the four on offer) for directory colour, file colour, hidden, executable etc?
 
Old 05-15-2013, 09:18 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,457

Rep: Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211
I think you mean the command ls, see the man page: http://linux.die.net/man/1/ls and look for indicator
 
1 members found this post helpful.
Old 05-15-2013, 09:23 AM   #3
rtmistler
Member
 
Registered: Mar 2011
Location: Milford, MA. USA
Distribution: MontaVista, Ubuntu, MINT
Posts: 964
Blog Entries: 7

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
I know in bash you can alias ls
Quote:
alias ls='ls --color=auto'
. Can you show an example of these symbols as you're seeing them? Sometimes file names can get characters, such as the tilde ~ which is typically used for backup file names. And many temporary files get pound signs # added because their names will closely match a file under edit, but the one with pound signs added are temporary files which may end up going away once you save your file or exit your editor.
 
1 members found this post helpful.
Old 05-15-2013, 09:45 AM   #4
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by rtmistler View Post
I know in bash you can alias ls . Can you show an example of these symbols as you're seeing them? Sometimes file names can get characters, such as the tilde ~ which is typically used for backup file names. And many temporary files get pound signs # added because their names will closely match a file under edit, but the one with pound signs added are temporary files which may end up going away once you save your file or exit your editor.
Surely, and thanks kindly for the response:
Here you can see the hidden contents of /usr (as generated in response to < $ ls -a > ), and the contents of
/usr/games, generated by < $ dir >

Code:
ichael@tex:/$ cd usr
michael@tex:/usr$ dir
X11@    bin/   games/    lib/      local/  share/  tmp@
X11R6/  dict@  include/  lib64/    man/    spool@  x86_64-slackware-linux/
adm@    doc/   info/     libexec/  sbin/   src/
michael@tex:/usr$ ls -a
./    X11R6/  dict@   include/  lib64/    man/    spool@  x86_64-slackware-linux/
../   adm@    doc/    info/     libexec/  sbin/   src/
X11@  bin/    games/  lib/      local/    share/  tmp@
michael@tex:/usr$ cd games
michael@tex:/usr/games$ dir
adventure*   bcd*        factor*   mille*      pom*     robots*       trek*
arithmetic*  caesar*     fish*     monop*      ppt*     rot13*        wargames*
atc*         canfield*   fortune*  morse*      primes*  sail*         worm*
backgammon*  cfscores*   gomoku*   number*     quiz*    snake*        worms*
banner*      countmail*  hangman*  phantasia*  rain*    snscore*      wtf*
battlestar*  cribbage*   hunt*     pig*        random*  teachgammon*  wump*
michael@tex:/usr/games$
 
Old 05-15-2013, 09:46 AM   #5
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by pan64 View Post
I think you mean the command ls, see the man page: http://linux.die.net/man/1/ls and look for indicator
That link took me to a document that referenced both @ and * but didn't at any point define them, but rather took it for granted that the reader was already acquainted with them; at least, as far as I could see.

thanks anyway,
Tex

Last edited by textillis; 05-15-2013 at 09:48 AM. Reason: punctuation for elucidation :)
 
Old 05-15-2013, 09:58 AM   #6
rtmistler
Member
 
Registered: Mar 2011
Location: Milford, MA. USA
Distribution: MontaVista, Ubuntu, MINT
Posts: 964
Blog Entries: 7

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
The asterisk (*) means that they're executable files.

The ampersand (@) means that they're symbolic links.

Perform
Quote:
ls -l
and you'll see.

What you're seeing here is the result of
Quote:
dir -F
Perform man on each of those commands to see the arguments. The -F for the dir command appends those special characters as a form of classification for the files.

The more typical, but probably more cryptic command is "ls" which many who came from Unix or have been in Linux for a long time, have used. "dir" didn't exist years ago, I don't know when it came about.
 
2 members found this post helpful.
Old 05-15-2013, 09:58 AM   #7
Z038
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 786

Rep: Reputation: 157Reputation: 157
Here are the file suffixes used by the ls command:

Code:
    / – directory
    nothing – normal file
    @ – link file
    * – Executable file
If you issue ls -al (the l gives you long format output), you'll see that the links are displayed more graphically with an arrow pointing to the object of the link.

Edit: I see rtmistler beat me to the answer. :-)

Last edited by Z038; 05-15-2013 at 10:00 AM.
 
1 members found this post helpful.
Old 05-15-2013, 03:47 PM   #8
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
Quote:
Originally Posted by rtmistler View Post
The more typical, but probably more cryptic command is "ls" which many who came from Unix or have been in Linux for a long time, have used. "dir" didn't exist years ago, I don't know when it came about.

On Linux at least, dir is ls. They are just alternate names to the same command, and support exactly the same options. Call up the man pages for each and you'll find that they are identical outside the command names.


As mentioned though, the file-type suffixes are added when the command is called with the -F option (and a few other variations). For more detail on what ls is capable of and what its output shows, check out its info page.

(This is true of most commands, BTW. The info pages go into much more detail than the man pages.)
 
1 members found this post helpful.
Old 05-15-2013, 08:25 PM   #9
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by David the H. View Post
On Linux at least, dir is ls. They are just alternate names to the same command, and support exactly the same options. Call up the man pages for each and you'll find that they are identical outside the command names.


As mentioned though, the file-type suffixes are added when the command is called with the -F option (and a few other variations). For more detail on what ls is capable of and what its output shows, check out its info page.

(This is true of most commands, BTW. The info pages go into much more detail than the man pages.)
Helpful? Well yeah: like a full-moon coming out behind clouds and lighting the way forward, for a traveler lost in a fanghorn-like forest.
Tx,
Tex

Last edited by textillis; 05-15-2013 at 08:26 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory not found; -xzvf not found; Makefile not found RealGomer Linux - Software 4 09-20-2010 10:02 AM
Caching Directory Entries binarybob0001 Programming 1 08-14-2008 07:19 AM
Read Directory Entries ? bodhankaryogesh Programming 2 04-03-2008 03:01 AM
What is kernel 2.4 equivalent of /proc/sys/vm/freepages entries [ found in 2.2.x ] ukursat Linux - Kernel 3 08-06-2007 09:26 AM
KMenu entries all in lost and found ilikejam Linux - Software 3 06-04-2004 06:30 PM


All times are GMT -5. The time now is 10:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration