unix

Keeping a central file repository

I have multiple computers for which I would like to keep files in sync.
I also happen to have a account on DreamHost as a webhosting company. There hosting plan includes a 50GB backup user so why not take advantage of that.

Alias arguments in bash

Use a function instead.

al() { ls -lAogFt $* | more; }

References


* http://my.brandeis.edu/bboard/q-and-a-fetch-msg?msg_id=00046x

Sed

Sed is a very useful program that often is used as a filter in shell scripts.

From the sed man page:

Sed  is a stream editor.  A stream editor is used to perform basic text
transformations on an input stream (a file or input from  a  pipeline).

Simple find-and-replace in text file


To replace all occurrences of the string findme and replace it with the string replcaceme in a file named test.file using sed just use the follwing command.

sed -e 's/findme/replaceme/g' test.fil > newtest.fil

Syndicate content