Updated: 2013-05-08 21:01 EDT
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 10 12 12 12 12 12 12 12 12 12 12 13 14 14 14 16 16 19 19 19 20 21 21 21 21 21 21 22 23 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24
Keep a notebook with a List of Commands in it:
cat file
vs. ls file
vs. find dir -name 'file'
clear
grep (-i, -v, -e)
grep
patterns) this termhostname
ls (-l, -i, -s, -a, -b, -p)
rm
vs. rmdir
vs. rm -r
sleep
touch
whoami
Know the meaning of each of the output fields of ls -dils
:
2 4 drwxr-xr-x 24 root root 4096 Sep 12 12:12 /
2883589 4 drwxr-xr-x 2 root root 4096 Oct 5 02:05 /bin
2883666 104 -rwxr-xr-x 1 root root 105776 Feb 23 2011 /bin/ls
2883587 12 drwxr-xr-x 186 root root 12288 Oct 17 13:38 /etc
2889578 4 -rw-r--r-- 1 root root 2209 Mar 19 2012 /etc/passwd
[…] in the rush for market share, many people seem to lose sight of the fact that the goal of GNU/Linux and free software is not popularity in itself, but the wide acceptance of a set of ideals.
At its most basic, free software is about helping users gain control of their computers so that they can participate unhindered in the digital conversations of the networks and the Internet. It’s about installing software freely, rather than being dictated to by the manufacturer. It’s about using your computer the way that you want, instead of ceding control to lock-down devices installed by software vendors without permission on your machine. – Bruce Byfield, http://itmanagement.earthweb.com/osrc/article.php/3733286
Using the sleep command to delay an action: I was rebuilding a RAID1 array, and needed to temporarily stop the nightly disk-scan job, so that the RAID1 rebuild could finish on time. I used the estimated time to schedule a restart of the disk-scan 80 minutes from now, so that I wouldn’t forget:
# kill -STOP 22768
# cat /proc/mdstat
md3 : active raid1 sda4[2] sdb4[1]
1441603520 blocks [2/1] [_U]
[==================>..] recovery = 91.2% (1316017856/1441603520)
finish=62.2min speed=33644K/sec
# ( sleep 80m; kill -CONT 22768 ) &
# exit
Checking student account directories and mail spool files:
# ls /home | wc
# ls -d /home/* | wc
# ls -d /home/???????? | wc
# LC_COLLATE=C ; export LC_COLLATE # strict ASCII sorting in ranges
# ls -d /home/[a-z][a-z][a-z0-9][a-z0-9][0-9][0-9][0-9][0-9] | wc
# ls -d /var/mail/[a-z][a-z][a-z0-9][a-z0-9][0-9][0-9][0-9][0-9] | wc
Checking student assignments:
# ls -d /home/[a-z][a-z][a-z0-9][a-z0-9][0-9][0-9][0-9][0-9]/CST8207-13W