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

Command-line queries include the Trash

Contributed by: Scot Hacker
This tip is valid for: Both BeOS and Haiku

If you run BeOS queries from the command line, be aware that they will include the Trash. The GUI query applet does not do this unless you specifically tell it to, but it can be a problem from the command line, and there’s no way to turn it off. You may want to filter your query results to make sure you’re not working with Trashed items, like this: query "((name=="filename")&&(BEOS:TYPE=="text/plain"))" | sed /Trash/d See Queries from the Terminal for basics.

Posted in Warnings

Comment on this tip

Comments may be incorporated into the original tip by site editors.

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.