Tag Archives: unix

sftp with restricted folder

I recently needed to set up an ftp server (or sftp server) that allows the user to transfer files. I had some restrictions: 1. The account cannot have `ssh` access since I don’t want an unauthorized person to run jobs on the server. 2. The account needs to be restricted to a single directory. I 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 »

Delete .DS_Store files

I have a bunch of .DS_Store files in many directories in my home folder because I transferred them from my old system, a Mac OS X. To remove them, do in `~/`. Got this in the comments of [this](http://hints.macworld.com/article.php?story=20031121213814221) post.

Control my computer’s desktop (graphically) via VNC

Since all my computers are Linux-based, I have OpenSSH installed on them so I can connect to them remotely. If I am not on the home network, I either have ports forwarded from the router or [VPN](http://blog.nguyenvq.com/2010/11/09/be-on-my-home-network-when-im-away-from-home-via-openvpn/) to my home network in order to connect to my destination. In addition, I almost always use [screen](http://www.gnu.org/software/screen/) read more »

Update system BIOS on a Linux machine with a Windows/DOS updater

I recently had to update my BIOS on my Toshiba Portege R705 laptop. Unfortunately, the updater can only be run on a Windows/DOS system. Luckily, I remembered reading [this](http://www.linuxjournal.com/content/ubuntu-netbook-remix-acer-aspire-one-netbook) article on Linux Journal that [described](http://manual.aptosid.com/en/bios-freedos-en.htm) how one can boot into [FreeDOS](http://www.freedos.org/) to update the system BIOS. I will outline what I did. 1. Find a read more »

Find files and find files containing certain text

This is a reminder to myself as I keep forgetting how to do these basic searches in Linux. To find files with file name containing the text `foo` using the command [find](http://content.hccfl.edu/pollock/unix/findcmd.htm): To find files with `bar` in it’s content using the command [grep](http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/):

Bash batch script to convert org-mode file to html

I recently read [this](http://www.reddit.com/r/emacs/comments/dy9yt/anyone_know_of_a_script_that_i_can_feed_an/) on reddit. I adapted the script on there to convert multiple org-mode files to html files. If you use it make sure you adapte the location of org-mode and your org.el file. Enjoy.

Twitter in Pidgin

I liked Adium in Mac OS X because it allows me to use all IM services (AIM, facebook, etc.), IRC, and Twitter in one application. For some reason Pidgin (based on libpurple like Adium) did not have Twitter support natively. [This](http://www.webupd8.org/2009/03/twitter-in-pidgin-plugin.html) site shows how, but it did not work. It appears pidgin-microblog in Ubuntu is read more »

Stream music to client via DAAP

Now that I have a NAS at home, I plan to place stuff that takes up a lot of space that doesn’t get used so often on there. However, with that comes the issue of file access. Since my NAS is linux based — ubuntu server edition to be exact — I can access files read more »

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 »