Thu 3 Jan 2008
Mac OS X Leopard (10.5) has some interesting new output from the ls(1) command. Some files include a “@” or a “+” at the end of the permission string. Like this:
-rw-rw-r–@ 1 12345 Jan 2 file.txt
This is different from the “@” used after the filename to note a symbolic link when using the -F flag. This new marker indicates:
- @ – the presence of extended metadata, see it with “ls -@”
- + – the presence of security ACL info, see it with “ls -e”
The new mdls(1) command might also be if interest for another view of the metadata. The metadata is stored in a file that begins with ._ (dot underscore) and then the normal filename. So the metadata for file.txt would be found in ._file.txt.
The new flags for ls are listed in the Leopard version of the ls man page, but if you’ve upgraded from Tiger you may not see any new man pages. The new man pages are delivered in gzip compressed format but the old man pages are not deleted — apparently a bug in the upgrade installer.
If you want to remove just those man pages that also have a (most likely newer) gzip version, then you can run this as root:
cd /usr/share/man
for f in `find . -name "*.gz" -print ; do
o=`echo $f | sed 's/\.gz//'`
if [ -f $o ] ; then
echo rm $o
fi
done
Once you are happy with the output of that, remove the echo statement and the old man pages will be deleted. This isn’t perfect, it still leaves old man pages laying around for things that were part of Tiger but are not part of Leopard. There will still be a man page for niutil(1) , for example, which is obsoleted from Leopard. But I think I can live with that.