unix: 2011年2月アーカイブ

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...

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:

* UNIX file permissions
* tar, gzip, and bzip2
* installing Gentoo on the Compaq Presario r3000

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

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

* Linux Questions: This is the best Linux forum out there. Most people are friendly and willing to help with any problems you may have running Linux. You can find me there quite often as well. My username is bulliver
* Kernel.org: This is the Linux kernel repository. If you need a kernel, this is the place.
* Ibiblio.org: Ibiblio is a massive archive of Linux software and documentation. It mirrors many Linux distributions FTP download sites, as well as the LDP (see below). Also, they archive my very own dir2ogg
* The Linux Documentation Project: This is the home of the Linux Guides and Howtos. Also has online versions of the man-pages. If you are looking for docs, try here first.
* Free Software Foundation: The home of GNU and FSF. Here you can find sources and docs for all the GNU software available. A vital part of any GNU/Linux system
* Open Source Initiative: Contains info on open-source software for both hackers and suits. If nothing else you should read the Halloween Documents, very entertaining.
* Gentoo Linux: My Linux distro of choice.
* ESRs homepage: If you don't know who Eric S. Raymond is, you need to educate yourself. His Website is full of quality FAQs, HOWTOs, writings and much more. There are many jewels waiting to be discovered at this site.
* Google Linux: If you can't find it anywhere else, try Linux Google.

このアーカイブについて

このページには、2011年2月以降に書かれたブログ記事のうちunixカテゴリに属しているものが含まれています。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。