Commands tagged bookmarks (9)

  • 14
    curl -u username -o bookmarks.xml
    avi4now · 2009-04-06 13:54:15 3
  • Found this useful query at The b.parent=2 in the command refers to the bookmarks folder to extract. See the source webpage for additional info.

    sqlite3 ~/.mozilla/firefox/*default/places.sqlite "select a.url, a.title from moz_places a, moz_bookmarks b where and b.parent=2;"
    jrdbz · 2013-04-12 17:41:34 1
  • pushd and popd are your friends, but sometimes they're just incompatible with the way one works... Two shell functions: bm bookmarkname - "bookmarks" the current directory, just 'cd $BMbookmarkname' to return to it. forget bookmarkname - unsets the 'bookmarkname' variable. It isn't mandatory, they cease to exist when the session ends. Show Sample Output

    bm() { export BM${1?"bookmark name missing"}="$PWD" ; }; forget() { unset BM${1?"bookmark name missing"} ; }
    unefunge · 2010-11-19 12:15:11 0
  • Extracts yours bookmarks out of sqlite with the format: dateAdded|url Show Sample Output

    sqlite3 ~/.mozilla/firefox/*.[dD]efault/places.sqlite "SELECT strftime('%d.%m.%Y %H:%M:%S', dateAdded/1000000, 'unixepoch', 'localtime'),url FROM moz_places, moz_bookmarks WHERE = ORDER BY dateAdded;"
    return13 · 2015-03-08 19:26:16 0
  • for i in $(ls /home/marco/.mozilla/firefox/*\.*/places.sqlite); do sqlite3 $i "SELECT strftime('%d.%m.%Y %H:%M:%S', dateAdded/1000000, 'unixepoch', 'localtime'),url FROM moz_places, moz_bookmarks WHERE = ORDER BY dateAdded;"; done

    "SELECT strftime('%d.%m.%Y %H:%M:%S', dateAdded/1000000, 'unixepoch', 'localtime'),url FROM moz_places, moz_bookmarks WHERE = ORDER BY dateAdded;"; done
    weirdname · 2016-05-19 02:09:17 1
  • 1. First we get the `item_id` for that `comment`. Adapt the -C[N] parameter for your use. 2. Then we show the bookmark's `title` (or `url`). With that in your hand it's a matter of seconds to open Firefox's library and find the bookmark. Handy for eg. forensics or better sanitize of a place.sqlite before sharing it (on the cloud). It sure has room for improvement. Show Sample Output

    sqlite3 -list places.sqlite 'SELECT item_id, content FROM moz_items_annos ;' | grep -A9 "string" ; sqlite3 places.sqlite 'SELECT title FROM moz_bookmarks WHERE .fk = <item_id number> ;'
    datruche · 2015-10-31 19:32:52 0
  • # Usage: ftagmarks TAG BOOKMARKS.JSON ftagmarks Bash ~/.mozilla/firefox/*.default/bookmarkbackups/bookmarks-*.json Tag can be partial matching, e.g. input 'Bas' or 'ash' will match 'Bash' tag. # Exact tag matching: ftagmark(){ jq -r --arg t "$1" '.children[] as $i|if $i.root == "tagsFolder" then ([$i.children[] as $j|{title: ($j.title), urls: [$j.children[].uri]}]) else empty end|.[] as $k|if $k.title == $t then $k.urls else empty end|.[]?' "$2"; } Usage: ftagmark TAG BOOKMARKS.JSON # List all tags: ftagmarkl(){ jq -r '.children[] as $i | if $i.root == "tagsFolder" then $i.children[].title else empty end' "$1"; } Usage: ftagmarkl BOOKMARKS.JSON # Requires: `jq` - must have CLI JSON processor Show Sample Output

    ftagmarks(){ jq -r --arg t "$1" '.children[] as $i|if $i.root == "tagsFolder" then ([$i.children[] as $j|{title: ($j.title), urls: [$j.children[].uri]}]) else empty end|.[] as $k|if ($k.title|contains($t)) then $k.urls else empty end|.[]?' "$2"; }
    qwertyroot · 2016-12-24 15:12:04 0
  • If you add the bookmarklet to your browser's bookmarks with like say, the keyword 'cfu', you can for example type 'cfu hello' in the location bar and the %s gets replaced with 'hello'. The bookmarklet will convert the search text to base64 for use with the commandlinefu website and will take you there. Tested with Firefox. Show Sample Output

    echo "javascript:location.href=''+encodeURIComponent('%s')+'/'+btoa('%s')+'/sort-by-votes'"
    darkfader · 2011-03-07 22:01:46 0

  • -6
    bm () { ... see description }
    Wonko7 · 2010-11-19 13:37:19 3

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Check These Out

Set Time Zone in Ubuntu
Reconfigures time zone in Ubuntu, which I cannot figure out how to do through the GUI. Worked like a charm to set my time zone to CEST from EDT.

Filter IP's in apache access logs based on use
The first sort is necessary for ips in a list to be actually unique.

add the result of a command into vi
':r!ls -l' results in listing the files in the current directory and paste it into vi

Speed up builds and scripts, remove duplicate entries in $PATH. Users scripts are oftern bad: PATH=/apath:$PATH type of thing cause diplicate.

List the size (in human readable form) of all sub folders from the current location
Sorted in human readable format.

Sum columns from CSV column $COL

Find all folder in /var that contains log in their path and have more than 10 files inside them, print the folder and the count
-L is for following symbolic links, it can be omitted and then you can find in your whole / dir

clone a hard drive to a remote directory via ssh tunnel, and compressing the image

list block devices
Shows all block devices in a tree with descruptions of what they are.

Convert ascii string to hex
Converts the ascii text to hex from bash. Check the sample output.

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: