ls -lFT output

ls -lFT output

am 10.01.2008 14:49:10 von MD Websunlimited

The following output from ls -lFT

-rwxr-xr-x@ 1 scott scott 306 11 Jan 00:13:52 2008 cleanup.sh*
-rwxr-xr-x@ 1 scott scott 42 11 Jan 00:14:24 2008 utf-8_test.sh*


I understand most of what is going on here but the '@' character has me
beat as i can't find a reference to it in man ls.

Also the '*' after the file name is confusing me.

can anyone help?



--
iMac 24 2.33GHz Intel Core 2 Duo, 2GB RAM, OSX 10.5.1

Re: ls -lFT output

am 10.01.2008 14:58:16 von Joachim Schmitz

Scott wrote:
> The following output from ls -lFT
>
> -rwxr-xr-x@ 1 scott scott 306 11 Jan 00:13:52 2008 cleanup.sh*
> -rwxr-xr-x@ 1 scott scott 42 11 Jan 00:14:24 2008 utf-8_test.sh*
>
>
> I understand most of what is going on here but the '@' character has
> me beat as i can't find a reference to it in man ls.
Could this be to indicate that this file has an ACL? dou you have
getacl/setacl on your system?

> Also the '*' after the file name is confusing me.
the -F option appends a * for executable files, a / for directories, an @
for symbolic links and a | for a FIFO

> can anyone help?
Bye, Jojo

Re: ls -lFT output

am 10.01.2008 15:25:01 von MD Websunlimited

On 2008-01-11 00:58:16 +1100, "Joachim Schmitz"
said:

> Scott wrote:
>> The following output from ls -lFT
>>
>> -rwxr-xr-x@ 1 scott scott 306 11 Jan 00:13:52 2008 cleanup.sh*
>> -rwxr-xr-x@ 1 scott scott 42 11 Jan 00:14:24 2008 utf-8_test.sh*
>>
>>
>> I understand most of what is going on here but the '@' character has
>> me beat as i can't find a reference to it in man ls.
> Could this be to indicate that this file has an ACL? dou you have
> getacl/setacl on your system?
>
>> Also the '*' after the file name is confusing me.
> the -F option appends a * for executable files, a / for directories, an @
> for symbolic links and a | for a FIFO
>
>> can anyone help?
> Bye, Jojo

Hi Jojo.
There are no ACLs on my system that I am aware of...

iMac24:~ scott$ getacl /Users/scott/Library/Scripts/cleanup.sh
-bash: getacl: command not found



ls -l still gets the mysterious '@' file marker



--
iMac 24 2.33GHz Intel Core 2 Duo, 2GB RAM, OSX 10.4.10

Re: ls -lFT output

am 10.01.2008 17:36:18 von Icarus Sparry

On Thu, 10 Jan 2008 14:25:01 +0000, Scott wrote:

> On 2008-01-11 00:58:16 +1100, "Joachim Schmitz"
> said:
>
>> Scott wrote:
>>> The following output from ls -lFT
>>>
>>> -rwxr-xr-x@ 1 scott scott 306 11 Jan 00:13:52 2008 cleanup.sh*
>>> -rwxr-xr-x@ 1 scott scott 42 11 Jan 00:14:24 2008 utf-8_test.sh*
>>>
>>>
>>> I understand most of what is going on here but the '@' character has
>>> me beat as i can't find a reference to it in man ls.
>> Could this be to indicate that this file has an ACL? dou you have
>> getacl/setacl on your system?
>>
>>> Also the '*' after the file name is confusing me.
>> the -F option appends a * for executable files, a / for directories, an
>> @ for symbolic links and a | for a FIFO
>>
>>> can anyone help?
>> Bye, Jojo
>
> Hi Jojo.
> There are no ACLs on my system that I am aware of...
>
> iMac24:~ scott$ getacl /Users/scott/Library/Scripts/cleanup.sh -bash:
> getacl: command not found
>
>
>
> ls -l still gets the mysterious '@' file marker

The manual page of ls on osx seems to say (trying again to get past some
wrapping issues)

The Long Format
If the -l option is given, the following information is displayed
for each file: file mode, number of links, owner name, group name,
number of bytes in the file, abbreviated month, day-of-month
file was last modified, hour file last modified, minute file
last modified, and the pathname. In addition, for each directory
whose contents are displayed, the total number of 512-byte blocks
used by the files in the directory is displayed on a line by
itself, immediately before the information for the files in the
directory. If the file or directory has extended attributes,
the permissions field printed by the -l option is followed by a
'@' character. Otherwise, if the file or directory has extended
security information, the permissions field printed by the -l
option is followed lowed by a '+' character.

It would help if you said more directly what your system was, rather than
me guessing from your signature.

Re: ls -lFT output

am 10.01.2008 18:59:48 von cfajohnson

On 2008-01-10, Scott wrote:
>
> The following output from ls -lFT

Is that the entire command? If so, what version of ls are you
using?

> -rwxr-xr-x@ 1 scott scott 306 11 Jan 00:13:52 2008 cleanup.sh*
> -rwxr-xr-x@ 1 scott scott 42 11 Jan 00:14:24 2008 utf-8_test.sh*
>
>
> I understand most of what is going on here but the '@' character has me
> beat as i can't find a reference to it in man ls.

What version of ls?

> Also the '*' after the file name is confusing me.

Read the man page for the -F option.

--
Chris F.A. Johnson, author
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence

Re: ls -lFT output

am 11.01.2008 15:57:18 von MD Websunlimited

On 2008-01-11 03:36:18 +1100, Icarus Sparry said:

> On Thu, 10 Jan 2008 14:25:01 +0000, Scott wrote:
>
>> On 2008-01-11 00:58:16 +1100, "Joachim Schmitz"
>> said:
>>
>>> Scott wrote:
>>>> The following output from ls -lFT
>>>>
>>>> -rwxr-xr-x@ 1 scott scott 306 11 Jan 00:13:52 2008 cleanup.sh*
>>>> -rwxr-xr-x@ 1 scott scott 42 11 Jan 00:14:24 2008 utf-8_test.sh*
>>>>
>>>>
>>>> I understand most of what is going on here but the '@' character has
>>>> me beat as i can't find a reference to it in man ls.
>>> Could this be to indicate that this file has an ACL? dou you have
>>> getacl/setacl on your system?
>>>
>>>> Also the '*' after the file name is confusing me.
>>> the -F option appends a * for executable files, a / for directories, an
>>> @ for symbolic links and a | for a FIFO
>>>
>>>> can anyone help?
>>> Bye, Jojo
>>
>> Hi Jojo.
>> There are no ACLs on my system that I am aware of...
>>
>> iMac24:~ scott$ getacl /Users/scott/Library/Scripts/cleanup.sh -bash:
>> getacl: command not found
>>
>>
>>
>> ls -l still gets the mysterious '@' file marker
>
> The manual page of ls on osx seems to say (trying again to get past some
> wrapping issues)
>
> The Long Format
> If the -l option is given, the following information is displayed
> for each file: file mode, number of links, owner name, group name,
> number of bytes in the file, abbreviated month, day-of-month
> file was last modified, hour file last modified, minute file
> last modified, and the pathname. In addition, for each directory
> whose contents are displayed, the total number of 512-byte blocks
> used by the files in the directory is displayed on a line by
> itself, immediately before the information for the files in the
> directory. If the file or directory has extended attributes,
> the permissions field printed by the -l option is followed by a
> '@' character. Otherwise, if the file or directory has extended
> security information, the permissions field printed by the -l
> option is followed lowed by a '+' character.
>
> It would help if you said more directly what your system was, rather than
> me guessing from your signature.

-----------------
Sorry about not specifically listing my system details but they are
pretty much as quoted in my sig.
iMac 24, 2.33GHz, Intel Core 2 Duo, OSX 10.5.1
The shell I'm using is bash but the same results with sh as well.
-----------------
The man output you've quoted is very interesting because it at least
partly explains what is going on in my system but also for the
differences to the output I get. ...

The Long Format
If the -l option is given, the following information is displayed
for each file: file mode, number of links, owner name, group name,
number of bytes in the file, abbreviated month, day-of-month file was
last modified, hour file last modified, minute file last modified, and
the pathname. In addition, for each directory whose contents are
displayed, the total number of 512-byte blocks used by the files in the
directory is displayed on a line by itself immediately before the
information for the files in the directory. If the file or directory
has extended security information, the permissions field printed by the
-l option is followed by a '+' character.

The very information that might have at least pointed me in the right
direction is mysteriously missing.
-----------------
Anyway, back to the man output from your system.
If the '@' indicates extended attributes, what attributes are we
talking about and how can I get a peek at the details?
I figured out ACLs but all of the files marked as having extended
attributes have no ACL associated with the file.

--
iMac 24 2.33GHz Intel Core 2 Duo, 2GB RAM, OSX 10.5.1

Re: ls -lFT output

am 11.01.2008 16:05:00 von MD Websunlimited

On 2008-01-11 04:59:48 +1100, "Chris F.A. Johnson" said:

> What version of ls?

Don't know -- how do I find out? -- there doesn't seem to be anything
in the man page regarding the version.

I'm getting some things sorted out -- the -F option for example.
--
iMac 24 2.33GHz Intel Core 2 Duo, 2GB RAM, OSX 10.4.10

Re: ls -lFT output

am 11.01.2008 16:40:08 von wayne

Scott wrote:
> ...
> Anyway, back to the man output from your system.
> If the '@' indicates extended attributes, what attributes are we talking
> about and how can I get a peek at the details?
> I figured out ACLs but all of the files marked as having extended
> attributes have no ACL associated with the file.

I don't have a Mac, but the POSIX commands for viewing acls and
extended attributes are getfacl/setfacl and getfattr/setfattr.

Try this: getfattr -m . -d filename

Also, some filesystems support (non-extended) attributes,
including NTFS and ext2. They are also indicated in the
"ls -l" output with a '+' or some such symbol following
the permissions. For ext[234] filesystems on Linux,
you can view these with "lsattr" command; you may have
some research to do to see if your Mac filesystem type
has such attributes, and if so what command is used
to view them.

-Wayne

Re: ls -lFT output

am 11.01.2008 17:38:22 von Icarus Sparry

On Fri, 11 Jan 2008 14:57:18 +0000, Scott wrote:

> On 2008-01-11 03:36:18 +1100, Icarus Sparry
> said:
>
>> On Thu, 10 Jan 2008 14:25:01 +0000, Scott wrote:

> Anyway, back to the man output from your system. If the '@' indicates
> extended attributes, what attributes are we talking about and how can I
> get a peek at the details? I figured out ACLs but all of the files
> marked as having extended attributes have no ACL associated with the
> file.

Sorry, I don't have such a system. I got the man page from the
developer.apple.com web site.

Re: ls -lFT output

am 13.01.2008 23:29:24 von David J Dachtera

Scott wrote:
>
> On 2008-01-11 03:36:18 +1100, Icarus Sparry said:
> [snip]
> >
> > It would help if you said more directly what your system was, rather than
> > me guessing from your signature.
>
> -----------------
> Sorry about not specifically listing my system details but they are
> pretty much as quoted in my sig.
> iMac 24, 2.33GHz, Intel Core 2 Duo, OSX 10.5.1
> The shell I'm using is bash but the same results with sh as well.

"ls" is not a shell built-in. So the shell it's invoked from should not
change its behavior.

David J Dachtera
DJE Systems