Tag Archives: command line

Add a printer on the command line – cups-pdf example

Suppose you need to add a printer to a computer on the command line, e.g., a server that you access via a terminal. [This](http://www.techrepublic.com/article/control-printers-in-linux-from-the-command-line/5055067) post outlines how to use some basic commands from the [CUPS](http://www.cups.org/documentation.php/network.html) system. I will illustrate with commands for a network-connected printer and [cups-pdf](http://www.linux.com/archive/feed/61826) for printing to PDF files (`~/PDF/`): The `-E` read more »

LPR printing on command line

These days, with Linux distros such as Ubuntu, printing is quite easy. You can add and remove printers and print files just as easily (or even more so) compared to Windows or Mac. Sometimes I might just want to print from the command line. To do so, I make use of the `lpr` command. To read more »

Split, cut, or sample a video file on the command line

There are many reasons to cut or split a video file. For example, one may want to cut a long video into multiple parts to upload to YouTube. I first ran into [this](http://superuser.com/questions/31135/split-mpeg-video-from-command-line) and [this](http://www.linuxquestions.org/questions/linux-newbie-8/how-do-you-split-mpg-files-using-a-ffmpeg-command-542607/), which suggests: However, for some reason my out file is almost as large as my in file, even though I’m read more »

Burn dvd from the command line

I recently had to back files from my Ubuntu-based NAS. I initially used [xfburn](http://www.xfce.org/projects/xfburn), a medium-weight burning software. It does a pretty good job. However, I decided to burn via the command line to refrain from pointing and clicking. I found [dvd+rw-tools](http://fy.chalmers.se/~appro/linux/DVD+RW/). Some simple examples are found [here](http://www.debuntu.org/2006/06/03/61-how-to-burn-dvds-from-the-command-line); the full filename solution was found [here](http://www.linuxquestions.org/questions/linux-newbie-8/using-growisofs-to-write-dvd-causes-small-file-names-736297/). read more »

(Batch) Amplify audio files from the command line

[Audacity](http://audacity.sourceforge.net/) is great, but it’s a GUI and sometimes I just want to do basic things like amplify the sound of some mp3 files. Discovered [mp3gain](http://mp3gain.sourceforge.net/) from [this](http://boards.straightdope.com/sdmb/archive/index.php/t-339352.html) thread and wrote this script to batch amplify the files: Note that mp3gain alters the original mp3 files directly. My default value is 10; feel free to read more »

Downloading, cURL vs. wget

I do more and more downloading using the command line these days, mainly using [wget](http://www.gnu.org/software/wget/) and [cURL](http://www.gnu.org/software/wget/). [This](http://daniel.haxx.se/docs/curl-vs-wget.html) is a good comparison of the two. Both are great at downloading. cURL supports more protocol (outside of http, https, ftp) and is bi-directional. wget can download files recursively (links on a webpage, and links that appear read more »

Wi-Fi on the command line

I depend on the GUI applet that comes with Ubuntu for wireless connections. However, if I ever am on a Linux laptop without X, I can follow [this](http://www.linuxjournal.com/content/wi-fi-command-line) guide.

how to set up sending mail from the command line

Often times I want to send emails to myself when a job is done or when something happens on the computer/server. Using the command line is the most portable and obvious as most software I run (eg, R) can execute from it. This site shows how to use mail and mutt to send emails from read more »

Accessing MS SQL Server from command line in Mac OS X and Linux/Unix

Unfortunately in my current line of work, I’ve been pulling data from MS SQL Server. My current workflow involves remotely logging into a windows machine, and from there, using the sql server software (MS SQL Server Management Studio) to issue queries and save data. This especially sucked in that I couldn’t write in the query read more »