如何通过标签搜索文件?

use*_*676 13 nautilus files tagging tracker

我可以用 nautilus 标记文件,但到目前为止还没有找到通过标记查找文件的解决方案。Tracker-search-tool 不提供搜索标签的功能,Nautilus 和我所知道的任何其他应用程序也不提供搜索功能。刚刚升级到 11.04。

Eno*_*oot 6

它被称为跟踪标签:

http://manpages.ubuntu.com/manpages/natty/man1/tracker-tag.1.html

它由 tracker-utils 包提供,它是跟踪工具的命令行版本。

-s -- lists all files associated with a tag
-a -- Add a tag to a file
Run Code Online (Sandbox Code Playgroud)

例子

添加标签:

tracker-tag -a TAG file
Run Code Online (Sandbox Code Playgroud)

按标签搜索:

tracker-tag -s TAG
Result: 1
  /home/sean/file
Run Code Online (Sandbox Code Playgroud)

来自我的系统的真实世界示例

<sean@mymachine:~> tracker-tag -a TAG exten
<sean@mymachine:~> tracker-tag -a testing atreides master.ldif php_error.log TrainingUpdates.otl

<sean@mymachine:~> tracker-tag -s testing
Results: 5
  /home/sean/TrainingUpdates.otl
  /home/sean/atreides
  /home/sean/exten
  /home/sean/master.ldif
  /home/sean/php_error.log

<sean@mymachine:~> tracker-tag -a myTagExample TrainingUpdates.otl atreides exten master.ldif php_error.log 
<sean@mymachine:~> tracker-tag -s myTagExample
Results: 5
  /home/sean/TrainingUpdates.otl
  /home/sean/atreides
  /home/sean/exten
  /home/sean/master.ldif
  /home/sean/php_error.log

<sean@mymachine:~> tracker-tag -s TAG
Result: 1
  /home/sean/exten
Run Code Online (Sandbox Code Playgroud)