Sat May 02 05:23:20 GMT 2015
From
/weblog/unix
http://developer.apple.com[..]rce/Conceptual/ShellScripting/index.html Introduction of 10 useful commend: objdump, file, od, xxd, strings, nm, time, ps, fuser, strace, ctags
http://www.linuxjournal.com/article/7330 Install a Visual OS server at Linux , may be useful later -
http://blog.codefront.net[..]-feisty-fawn-the-complete-newbies-guide/ Hello world of driver development -
http://www.linuxdevcenter.com/lpt/a/7060 Commands cheat sheet -
http://fosswire.com/wp-content/uploads/2007/08/fwunixref.pdf Tutorial of build various servers -
http://www.intac.net/build-your-own-server/ http://www.tuxradar.com/content/7-cool-linux-projects # !!- run the previous command.
# !ls - run the last command that started with ‘ls’.
# !ls:p - This will display the command instead of running it.
# !$ - run the last word of the previous command. (for substitutions)
# !$:p - Instead of running the last word of the previous command this will print it out.
# !* run the previous command without the first word. (for substitutions)
# !*:p - print, again
http://codytaylor.org/2009/09/linux-bang-commands.html Tutorial of system logging under unix -
http://www.coolcoder.in[..]mmon-linux-log-files-name-and-usage.html http://www.opsschool.org/en/latest/
(google search)
(amazon search)
Mon Jan 12 08:39:36 GMT 2015
From
/weblog/unix
X.org 7.4 need Option "AllowEmptyInput" "off" in Section "ServerFlags". Otherwise mouse and keyboard will not working
http://forums.freebsd.org/showthread.php?t=4708 And some driver program, like nvidia, doesn't aware of that, yet. So after recompilation, mouse and keyboard are not working.... and need to update the config manually.
Good reasons, showing how easy to manual GUI under unix desktop -
http://spin.atomicobject.com/2013/10/26/why-linux-desktop/ Allow you mstsc to unix -
http://www.ubuntugeek.com[..]-remote-desktop-protocol-rdp-server.html
(google search)
(amazon search)
Thu Feb 06 09:54:50 GMT 2014
From
/weblog/unix
Reference of linux proc file system -
http://www.coolcoder.in[..]-power-of-proc-file-system-in-linux.html Power save tool -
http://www.ubuntugeek.com[..]er-saving-package-for-linux-systems.html Disk usage report -
http://www.ubuntugeek.com[..]usage-and-availability-report-tools.html USB info at /var/log/messages
Oct 20 03:56:14 carfield kernel: [ 3568.521099] usb 1-6: configuration #1 chosen from 1 choice
Oct 20 03:56:14 carfield kernel: [ 3568.557038] Initializing USB Mass Storage driver...
Oct 20 03:56:14 carfield kernel: [ 3568.557228] scsi4 : SCSI emulation for USB Mass Storage devices
Oct 20 03:56:14 carfield kernel: [ 3568.557407] usbcore: registered new interface driver usb-storage
Oct 20 03:56:14 carfield kernel: [ 3568.557429] USB Mass Storage support registered.
Oct 20 03:56:19 carfield kernel: [ 3573.557428] scsi 4:0:0:0: Direct-Access BUFFALO USB Flash Disk 4000 PQ: 0 ANSI: 0 CCS
Oct 20 03:56:19 carfield kernel: [ 3573.559904] sd 4:0:0:0: [sdc] 7864320 512-byte hardware sectors: (4.02 GB/3.75 GiB)
Oct 20 03:56:19 carfield kernel: [ 3573.560766] sd 4:0:0:0: [sdc] Write Protect is off
Oct 20 03:56:19 carfield kernel: [ 3573.562913] sd 4:0:0:0: [sdc] 7864320 512-byte hardware sectors: (4.02 GB/3.75 GiB)
Oct 20 03:56:19 carfield kernel: [ 3573.563765] sd 4:0:0:0: [sdc] Write Protect is off
Oct 20 03:56:19 carfield kernel: [ 3573.563772] sdc: sdc1
(google search)
(amazon search)
Thu Jan 30 03:08:46 GMT 2014
From
/weblog/unix
An article to share how to organizate files as well as daily task, his approach is difference from me, but still worth to take a look
http://www.onlamp.com/lpt/a/6377 In contrast to the author experience, categories work for me. Spotlight or google desktop doesn't add value, I can just find it.
http://www.thegeekstuff.com/2014/01/linux-sysadmin-books/
(google search)
(amazon search)
Mon Oct 01 08:58:55 GMT 2012
From
/weblog/unix
In Solaris, we can get stack trace even if binary is not compile with debug symbol, just run gdb with coredump: "gdb binary core", then can use "where" command in GBD console for that
Look like "bt" give you some result -
http://gbenson.net/?p=111 A quick tutorial of GDB -
http://www.thegeekstuff.com/2010/03/debug-c-program-using-gdb Use objdump to analysis the object file -
http://www.thegeekstuff.com/2012/09/objdump-examples/
(google search)
(amazon search)
Thu Jul 07 15:54:28 GMT 2011
From
/weblog/unix/script
xmlwf, need to know if a XML document is well formed? (A configuration file maybe..)
mkfifo is the coolest one. Sure you know how to create a pipeline piping the output of grep to less or maybe even perl.
nl, add number for every line of a file
http://bashcurescancer.com[..]/10-linux-commands-youve-never-used.html http://www.thegeekstuff.com/2010/11/50-linux-commands/ ======================================create real player song list
#!/bin/sh
win_path=C:/tools
linux_path=/mnt/disk/winapp
for file in `find $1 -type f`;
do
if(`/bin/cat $file | grep $win_path`); then echo $file;fi;
done;
/usr/bin/find $MUSIC_SRC -type f -exec /bin/echo
file://{} \; > $TMPDIR/tmp.rm
while read i ; do /bin/echo "$RANDOM $i" ; done < $TMPDIR/tmp.rm | /bin/sort -n | /bin/sed 's/^[0-9]* //' > $TMPDIR/tmp1.rm
/bin/cat $TMPDIR/tmp1.rm |/bin/sed -e 's/file:\/\///' >$HOME/mplayer.list
/bin/cat $TMPDIR/tmp1.rm |/bin/grep -vi wma >$HOME/real.rm
/bin/cat $TMPDIR/tmp1.rm |/bin/sed -e 's/file:\/\/\/var\/www\/html/http:\/\/www.carfield.com.hk/'>/var/www/html/.secure/media/music/live.rm
======================================remove log
for file in `find -type f|grep website.|grep -v lck`;do rm -f $file;done
======================================for loop
for((a = 1; a <10; a++)); do wget -b "http://www.thai.net/ferrari545/bbs_series/ku_bbs_000$a.jpg";done
======================================resize photo
for i in *.jpg; do convert -geometry 1024x768 $i newdir/$i ; done
======================================basic calculation
i=1;find|grep -v zng|grep -v avi|while read file;do mv "$file" $i.jpg;i=$((i+1));done
======================================# Make 3 a copy of 1 (stdout)
exec 3>&1
result="$(command to generate stream \
| tee /dev/fd/3 \
| command to process stream)"
# Now work with $result
# The original stream also went to the console
http://binkley.blogspot.com[..]5/getting-more-from-streams-in-bash.html
(google search)
(amazon search)
Mon Feb 07 16:47:36 GMT 2011
From
/weblog/unix
Linux Boot Process -
http://www.thegeekstuff.com/2011/02/linux-boot-process if you want to boot into something you can edit the boot parameters in grub:
"e" to edit
replace the boot parameters from ro xxxx xxxx to "rw init=/bin/bash"
and you'll be able to access a limited shell (no job control), then can run
ifconfig eth0 up
dhclient
to bring up network.
https://bugs.launchpad.net/ubuntu/+bug/430272/comments/24 If there is really disaster situation that grub fail, can try this to reinstall grub:
sudo mount /dev/sdXx /mnt
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /sys /mnt/sys
sudo mount -o bind /proc /mnt/proc
sudo chroot /mnt
Once at the prompt I reinstall grub:
Code:
grub-install /dev/sda
and then updated grub
Code:
update-grub
then Ctrl-D twice to exit, and reboot.
http://ubuntuforums.org/showthread.php?t=1677888
(google search)
(amazon search)
Thu Sep 17 17:33:07 GMT 2009
From
/weblog/unix
Read Ext2/Ext3 partition from Windows -
http://www.diskinternals.com/linux-reader/ Experience of switching to Linux, comment of OpenMP is interesting -
http://anteru.net/2009/09/14/604/
(google search)
(amazon search)