Help answer threads with 0 replies.
Go Back > Blogs > linux-related notes
User Name


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Uncategorized Entries with no category

Download files from a list while (re)naming them at the same time

Posted 11-27-2015 at 01:27 PM by the dsc (linux-related notes)
Updated 11-27-2015 at 01:33 PM by the dsc

"wget -i" is perhaps the tool of choice to download files from a list, but it doesn't allow you to set custom file names for the individual files on the list file. So, if you want to download a bunch of podcast episodes, but would want each file to have a descriptive file name rather than "12345.mp3", it won't help you.

A simple alternative is to have a download list with the file URLS followed by the "-O" flag and desired file name, and read this file...
Posted in Uncategorized
Views 142 Comments 2 the dsc is offline

Scary massive Debian-testing upgrade went well, it seems

Posted 11-12-2015 at 04:52 PM by the dsc (linux-related notes)

Probably the largest upgrade I've done so far, at least in the last five years or so. Most individual upgradeable packages, if selected individually, would require uninstalling half of the system. But "mark all upgrades" on synaptic in contrast required uninstalling just a few obscure packages, seemingly not affecting anything I use often. There were a few bugged packages, but the bugs didn't seem to apply to me, so I upgraded them anyway, as there was no choice.

But the...
Posted in Uncategorized
Views 433 Comments 0 the dsc is offline

Terminal with similar keybindings to kwrite / kate / gedit / html text fields?

Posted 10-06-2015 at 10:04 PM by the dsc (linux-related notes)

Not tremendously important, so I'll not post on the forums.

On text editors I'm frequently using things like shift/control+shift to select text and overwrite it. But besides holding control and using the keys to jump between words, terminals usually don't do selection the same way. You can try to select with the mouse, but it just works to copy to the clipboard, it won't be replaced by the text you type next. And regarding the mouse aspects, I think pasting will often/always...
Posted in Uncategorized
Views 764 Comments 0 the dsc is offline

Google reverse image search from command line/Geeqie/etc with python and shell scripts

Posted 10-04-2015 at 01:43 AM by the dsc (linux-related notes)
Updated 10-04-2015 at 02:42 AM by the dsc

There's another method which consists in uploading the image from your computer in some free host and then giving this URL to google via command line, but it's kind of a scumbag-ish thing to do, I think.

Based on/essentially identical to the first answer to a question in stack overflow:

#!/usr/bin/env python
import sys
filePath = sys.argv[-1]

import requests
Posted in Uncategorized
Views 789 Comments 0 the dsc is offline

Semi-auto-generated, nicely formatted, apropos-like list of your custom bash functions

Posted 10-01-2015 at 01:35 AM by the dsc (linux-related notes)

bold=$(tput bold)
normal=$(tput sgr0)

lsfunctions ()
tail -n+10 /path/to/custom-bash-functions | grep "()" | sort | sed 's|(.*#||'  | sed "s|^|${bold}|;s|\ |${normal}\ |"
↑ Change the number "10" to whichever line you want to start grepping the functions

"lsfunctions" would be like "apropos /usr/bin/*", or whatever really works, but restricted to your custom...
Posted in Uncategorized
Views 699 Comments 0 the dsc is offline


All times are GMT -5. The time now is 02:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration