The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

View and change file attributes

Contributed by: Matthew Schinckel
This tip is valid for: Both BeOS and Haiku

In addition to the many standard Unix tools Be has included in /boot/beos/bin, there are also a couple of custom tools that make it easy to view and change a file’s attributes.

To view a file’s attributes from the Terminal, type listattr filename.

However, this will only show you the byte size, name, and type of the attributes. It won’t show you its value (contents). To see contents, use the Tracker Add-On AttributeViewer. To add attributes to a file type addattr fieldname value filename

For example: addattr huey duey foobar will add an attribute named “huey” with a value of “duey” to a file called foobar. To remove attributes, use: rmattr fieldname filename. You can get more details on usage by typing addattr –help .

Better yet, check out the following shell scripts that use this and other commands to process multiple files…

email_conv – Email Conversion Package, at
http://www.box.net.au/~jaq/ema il_conv.zip
[Editor’s note: URL no longer functional].

People Porter, at
http://www.betips.net/software/

Posted in Terminal


(comments are closed).