unix stuff

Linux Links

Heres some links to some Linux-related websites that I find myself accessing quite often:

Bash one-liners

Here are a few bash one-liners that you may find useful. All are written by me unless otherwise noted.

This one converts the symbolic permissions to octal (ie: numbers) when using 'ls -l':

ls -l | sed -e 's/rwx/7/g' -e 's/r--/4/g' -e 's/r-x/5/g' -e 's/rw-/6/g' -e 's/---/0/g'

Running in your home directory you may see something like:

total 1637
d700   3 bulliver wheel     128 Oct  3  2003 Desktop
d700  11 bulliver wheel    1296 Jun 14 15:02 Mail
-644   1 bulliver users 1015742 Jun 13 15:05 TICPP-2nd-ed-Vol-two.zip
d755   4 bulliver users     232 Jun 13 02:06 assembly_utils
d755   2 bulliver users    1712 Jun 12 02:01 c
d755   2 bulliver users     656 Jun  7 14:26 c++
-600   1 bulliver users  252785 Jun  7 23:25 channels.txt
d755   3 bulliver users     328 May 24 21:30 dir2ogg
-644   1 bulliver users    6451 May 30 00:08 dmesg.txt
d755   2 bulliver users     136 Jun  9 12:45 iso
d755   2 bulliver wheel    1352 Jun  8 14:24 kernels
d755  22 bulliver wheel    1624 Jun 13 18:40 local_docs
d755   2 bulliver users     216 Sep 23  2003 minix
d755   2 bulliver users     456 Jun  9 11:58 pdf
d755   2 bulliver users     320 Jun 13 23:43 perl
d755   4 bulliver users    1016 Jun 13 19:25 python
-644   1 bulliver users  154713 Jun 10 00:15 shot0001.jpg
-644   1 bulliver users   22252 Jun 11 00:29 snake.asm
d755   6 bulliver users     488 May 18 03:10 source
d755   6 bulliver wheel     208 May  3 15:26 xml

Here's one to find your IP address. It was not written by me, I gleamed it from linuxquestions.org. I will try and credit the author here soon:

lynx -dump http://whatismyip.com | awk '/Your/ {print $4}'

These next two match email addresses and hypertext links respectively:

grep -o "[-_a-z0-9\.]*@[-_a-z0-9\.]*\..\{2,3\}" file grep -o "http://[-_a-z0-9\.]*\..\{2,4\}[-_a-z0-9\.]*" file

We can use this to, say, grab the email address of all the kernel maintainers (please don't spam them...):

grep -o "[-_a-z0-9\.]*@[-_a-z0-9\.]*\..\{2,3\}" /usr/src/linux/MAINTAINERS | sort | uniq

or get all the slashdot article links without going to slashdot:

lynx --dump http://slashdot.org | grep -o "http://[-_a-z0-9\.]*\..\{2,4\}[-_a-z0-9\.]*" | sort | uniq | grep -v slashdot.org

quick and dirty guides

Quick and dirty guides are shorter than howto's, but easier to understand than manpages. I hope to write lots on all sorts of topics. If you have a topic you want to see a quick and dirty guide for than drop me a line. If it's something I actually know about you just might see it here.

The quick and dirty guide to:

Code

I am not a developer by any stretch of the imagination but I have written a few things that someone may find useful. It is starting to become quite a few things, so I have created a separate page for all the software I have written.

I also have a page with poems written in programming languages. I had hoped people would send in submissions but it hasn't happened yet. Maybe someday...

Documentation

I also fancy myself as something of a writer. Like everything else I start, the few books I am working on are in various states of disarray, waiting to be updated and completed. Hopefully I can get something up here soon.

I have written up some notes on using Linux with the Cowan iAudio X5E.

I have created a page that details how different browsers implement the CSS of this site, specifically my homepage. Not surprisingly, Microsoft Internet Explorer does pretty poorly in this regard, which you may have noticed if you are using it right now!.

stats

It is Friday May 09, 2008 8:25 pm
This page served 6535 times
This page last modified: April 14, 2008 11:28 am
Your IP address is: 38.103.63.18
You are browsing using: CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
You are browsing from: United States.
badcomputer.org's uptime: 20:25:41 up 15 days, 21:07, 1 user, load average: 0.00, 0.00, 0.00

local

home | unix stuff | dir2ogg | sneetchalizer | wmainfo | q&d guide to permissions | q&d guide to tar and gzip | code | MS rant | browser shootout | linux & iAudio X5 | photos | music | programming poetry | sieve of Eratosthenes | plea | rain | suffer | archive | about | recipes | compaqr3000 | sitemap

search

Google

credits

hacker emblem

This page, and all pages on this site were created and are maintained by Darren Kirby using valid XHTML 1.0 and CSS, and are ©copyright 2002 - 2008. The Penguin image was created by Tukka, and is used by permission. Inspiration for the look of this site was provided by Eric A. Meyer's CSS gallery. This website runs on Gentoo Linux. It is served by Apache. PHP and MySQL hold together the backend.

advertisement