[X4U] Command to get permissions of a single item?
Brett Conlon
brett.conlon at sonydadc.com
Mon Oct 30 19:08:57 PST 2006
I usually use "ls -la" to show permissions on a whole folder. Here's what
the man page on ls has to say about -l
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
modi-
fied, hour file last modified, minute file last modified, and the
path-
name. 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 "a" operand shows .hidden files too - kinda like show all.
But you said you wanted permissions for a single file... Doug's suggestion
is correct, include it with the command:
ls -l /path_to_file
Coj
Doug McNutt <douglist at macnauchtan.com>
Sent by: x4u-bounces at listserver.themacintoshguy.com
31/10/06 12:56 PM
Please respond to
"A place to discuss Mac OS X for the casual user."
<x4u at listserver.themacintoshguy.com>
To
Mac OS X for Users <x4u at listserver.themacintoshguy.com>
cc
Subject
Re: [X4U] Command to get permissions of a single item?
At 20:29 -0400 10/30/06, Jerry Krinock wrote:
> The only command I can find for reading permissions is "ls",
>but of course that gives it for ITEMS IN the subject, which must be a
>directory.
I think you'll find that ls will return data for a single file if it is
offered as the argument without any wild cards.
If you're looking for permissions of a directory then use the -d option.
--
--> Halloween == Oct 31 == Dec 25 == Christmas <--
_______________________________________________
X4U mailing list
X4U at listserver.themacintoshguy.com
http://listserver.themacintoshguy.com/mailman/listinfo/x4u
Listmom is trying to clean out his closets! Vintage Mac and random stuff:
http://search.ebay.com/_W0QQsassZmacguy1984
More information about the X4U
mailing list