Last active
December 15, 2017 22:54
-
-
Save gwpl/a00e18bc150f1e3518335d13c5e46ad7 to your computer and use it in GitHub Desktop.
2017-12-15 xattr command line Semantic Desktop Style File Tagging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2017-12-15 xattr command line Semantic Desktop Style File Tagging | |
# this gist: https://gist.github.com/gwpl/a00e18bc150f1e3518335d13c5e46ad7 | |
# Perform on xattr filesystem: | |
setfattr -n user.xdg.tags -v "foo,bar" file.png | |
setfattr -n user.xdg.comment -v "example comment" file.png | |
setfattr -n user.baloo.rating -v "10" file.png | |
getfattr -d file.png | |
# Screenshot how it looks like in Dolphin GUI : https://imgur.com/oguuJNm | |
# Returns: | |
# # file: file.png | |
# user.baloo.rating="10" | |
# user.xdg.comment="example comment" | |
# user.xdg.origin.url="https://example.com/file.png" | |
# user.xdg.referrer.url="https://example.com/page.html" | |
# user.xdg.tags="foo,bar" | |
# P.S. other usefull key-value pairs set by your browser when you download files: | |
# setfattr -n user.xdg.origin.url -v "https://example.com/file.png" file.png | |
# setfattr -n user.xdg.referrer.url -v "https://example.com/page.html" file.png | |
# References: | |
# https://www.freedesktop.org/wiki/CommonExtendedAttributes/ | |
# http://vhanda.in/blog/2014/07/tagging-your-files/ | |
# https://unix.stackexchange.com/a/44400/9689 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment