beastie
unix
beastie

vermaden's links / resources

updated:

banner

*. vermaden
0. unix
misc:
tools:
cli:
video:
1. freebsd
smp:
wiki:
security:
misc:
storage:
cluster:
laptop:
jails:
blogs:
2. dragonfly bsd
3. netbsd
4. solaris
5. x11
vnc:
misc:
fluxbox:
openbox:
pekwm:
6. emulation
7. hardware
8. other
9. graphics
a. fun
b. howtos
c. polish

screenshot
wallpapers
uptime

stats.os
stats.browser

freebsd.org lighttpd.net
desktopia: history between 2005.11.08 ↔ 2007.04.16:

thumb
2005.11.08
thumb
2006.07.15
thumb
2006.08.24
thumb
2006.08.30
thumb
2006.11.11
thumb
2006.12.28
thumb
2007.01.11
thumb
2007.02.19
thumb
2007.04.03
thumb
2007.04.06
thumb
2007.04.16

[×] close

CLI Power

call last argument of previours command:
% echo content > that
% cat !$
cat that
content

make color grep:
% export GREP_COLOR=32
% alias grep='grep --color'
% dmesg | grep SMP
root@:/usr/obj/usr/src/sys/SMP
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
SMP: AP CPU #1 Launched!
SMP: AP CPU #2 Launched!
SMP: AP CPU #3 Launched!

aliases with arguments:
% ls
gfx/ info/ misc/ scripts/ tmp/
% alias lsg='ls | grep $1'
% lsg gfx
gfx/

go back to last dir:
~ % cd /usr/src/sys/i386/conf
/usr/src/sys/i386/conf % cd /usr/src
/usr/src % cd -
/usr/src/sys/i386/conf
/usr/src/sys/i386/conf %

call command from history:
% history
  1  uptime && uname -nprism
  2  top -b -ores
  3  ls -l
  4  ssh 85.90.166.22
  5  history
% !1
uptime && uname -nprism
11:00AM  up 15 days,  3:43, 6 users, load averages: 0.05, 0.04, 0.02
FreeBSD vermaden.go.pl 6.2-RELEASE-p2 i386 i386 SMP-LITE
% !uptime
uptime && uname -nprism
11:00AM  up 15 days,  3:43, 6 users, load averages: 0.05, 0.04, 0.02
FreeBSD vermaden.go.pl 6.2-RELEASE-p2 i386 i386 SMP-LITE

show arguments of some command from history:
% cat .xmodmaprc
keycode 91 = period
% !cat:p
cat .xmodmaprc

do something important while doing something else big:
/usr/src/sys/i386/conf % pushd /etc
/etc /usr/src/sys/i386/conf
/etc % cd rc.d

(...) # do many other things

/etc/rc.d % popd
/usr/src/sys/i386/conf
/usr/src/sys/i386/conf %

call exact argument from typed before commands:
% cat .xmodmaprc .xpdfrc
keycode 91 = period
urlCommand "opera -newpage %s"
% ls !-1:2
ls .xpdfrc
.xpdfrc
% grep 91 !-2:1
grep 91 .xmodmaprc
keycode 91 = period

exec again last command with changed argument:
% ls /var
audit crash mail spool lib run db
games named cron empty log tmp tmp
% ^/var^~
ls ~
gfx info misc scripts tmp

call previous (not actual) PWD:
% cd /etc
/etc % cd /usr/local/etc
/usr/local/etc % mv ~-/apache.conf .
% echo $OLDPWD
/etc

check if command is just an alias:
% which portmaster
portmaster: aliased to portmaster -D

kill jobs:
% encode.sh &
[1] 41254
% galculator &
[2] 42089
% kill %1
[1] - terminated encode.sh

repeat last typed command:
% cat /var/log/debug.log
cat: /var/log/debug.log: Permission denied
% sudo !!
sudo cat /var/log/debug.log
Nov 9 17:36:38 newsyslog[496]: logfile first created
% screen -r
There are several suitable screens on:
    4699.pts-3.savio    (Detached)
    23866.pts-0.savio   (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
% !! 23866.pts-0.savio
screen -r 23866.pts-0.savio
[detached]
%

record whole terminal session with script:
% script
Script started, output file is typescript
% ls
gfx info misc scripts tmp unix.png
% uname -spr
FreeBSD 6.2-PRERELEASE i386
% exit
Script done, output file is typescript
% less typescript
(...)

typical shell usage:
% history
  1  uptime && uname -nprism
  2  top -b -ores
  3  ls -l
  4  ssh 85.90.166.22
  5  history
% ls scripts
backup.sh    bsdsar.sh     burn.sh     loop.sh
% tar -czvf - !$ | !4 "dd > !$.tar.gz"
tar -czvf - scripts | ssh 85.90.166.22 "dd > scripts.tar.gz"
a scripts
a scripts/backup.sh
a scripts/burn.sh
a scripts/loop.sh
a scripts/bsdsar.sh
Password:
20+0 records in
20+0 records out
10240 bytes transferred in 0.000461 secs (22207690 bytes/sec)
% history
  1  uptime && uname -nprism
  2  top -b -ores
  3  ls -l
  4  ssh 85.90.166.22
  5  history
  6  ls scripts
  7  tar -czvf - scripts | ssh 85.90.166.22 "dd > scripts.tar.gz"
% !4 "tar -tzf scripts.tar.gz"
ssh 85.90.166.22 "tar -tzf scripts.tar.gz"
Password:
scripts
scripts/backup.sh
scripts/burn.sh
scripts/loop.sh
scripts/bsdsar.sh
% alias server='ssh 85.90.166.22 -l remote'
% which alias
server: aliased to ssh 85.90.166.22 -l remote
% ls scripts
backup.sh    bsdsar.sh     burn.sh     loop.sh
% tar -czvf - !$ | server "dd > !$.tar.gz"
tar -czvf - scripts | ssh 85.90.166.22 -l remote "dd > scripts.tar.gz"
a scripts
a scripts/backup.sh
a scripts/burn.sh
a scripts/loop.sh
a scripts/bsdsar.sh
Password:
20+0 records in
20+0 records out
10240 bytes transferred in 0.000461 secs (22207690 bytes/sec)
% !alias
alias server='ssh 85.90.166.22 -l remote'
% ^85.90.166.22^freebsd.org
alias server='ssh freebsd.org -l remote'
% !tar
tar -czvf - scripts | ssh freebsd.org -l remote "dd > scripts.tar.gz"
a scripts
a scripts/backup.sh
a scripts/burn.sh
a scripts/loop.sh
a scripts/bsdsar.sh
Password:
20+0 records in
20+0 records out
10240 bytes transferred in 0.000461 secs (22207690 bytes/sec)
% !1
uptime && uname -nprism
11:00AM  up 15 days,  3:43, 6 users, load averages: 0.05, 0.04, 0.02
FreeBSD vermaden.go.pl 6.2-RELEASE-p2 i386 i386 SMP-LITE

[×] close


Add the following to /etc/rc.conf:
dbus_enable="YES"
Add the following to ~/.xinitrc or ~/.xsession:
exec dbus-launch --exit-with-session gnome-session
To use D-BUS with GDM session create gnome-dbus.desktop:
[Desktop Entry]
Encoding=UTF-8
Name=GNOME with D-BUS
Comment=GNOME Desktop with D-BUS support
Exec=/usr/local/bin/dbus-launch --exit-with-session /usr/X11R6/bin/gnome-session
TryExec=/usr/local/bin/dbus-launch
Type=Application

Using Fluxbox with D-BUS, add the following to ~/.xinitrc:
exec dbus-launch --exit-with-session fluxbox
[×] close

unclutter: /usr/ports/misc/unclutter
Hides mouse pointer when idle, after specified time.
To use, add the following to ~/.xinitrc:
# hides the mousepointer when inactive
unclutter -idle 2 -jitter 10 -root &

autocutsel: /usr/ports/deskutils/autocutsel
Keeps the different cut-buffers in sync.
To use, add the following to ~/.xinitrc:
# keeps the different cut-buffers in sync
autocutsel &

[×] close

add the following to /etc/gettytab:
username:\
  :al=username:ht:np:

add the following to /etc/ttys:
ttyv0 "/usr/libexec/getty username" cons25 on secure
more obscure method, add the following to /etc/rc.local:
echo "Autologin of user ${USER}"
cd /home/${USER}
su - ${USER}

then autostart x11, add the following to your shell startup file:
if [ `tty` = /dev/ttyv0 ]; then
  xinit
fi

[×] close

load scbus cd pass atapicam kernel modules or build kernel with them:
# kldload scbus
# kldload cd
# kldload pass
# kldload atapicam

burn DVD-R or DVD+RW:
# growisofs -dvd-compat -Z /dev/cd0 -J -R /path/to/data
burn ~/image.iso to DVD-R:
# growisofs -dvd-compat -Z /dev/cd0=~/image.iso
blank DVD+RW:
# growisofs -Z /dev/cd0=/dev/zero
format DVD+RM:
# dvd+rw-format /dev/cd0
add data to DVD+RW:
# growisofs -dvd-compat -M /dev/cd0 -J -R /path/to/nextdata
blank DVD-RW:
# dvd+rw-format -blank=full /dev/cd0
burn ~/image.iso to DVD-RW:
# growisofs -use-the-force-luke=dao -Z /dev/cd0=~/image.iso
DVD-RAM preparation:
# dd if=/dev/zero of=/dev/acd0 count=2
# bsdlabel -Bw acd0
# newfs /dev/acd0
# mount /dev/acd0 /mnt
and use as standart mounted partition.

burn CUE/BIN images

install /usr/ports/sysutils/cdrdao port:
# cd /usr/ports/sysutils/cdrdao && make install clean
list your recorders:
# cdrdao scanbus
1,0,0: SONY, DVD-ROM DDU1621, S1.6
2,0,0: HP, CD-Writer+ 9500, 1.0e

to burn image that is handled by image.bin and image.cue use this command:
# cdrdao write --device 1,0,0 --driver generic-mmc image.cue
[×] close

first install ccache port:
# cd /usr/ports/devel/ccache && make install clean
or add a package:
# pkg_add -r ccache
then add the following to /etc/make.conf:
CC=/usr/local/libexec/ccache/world-cc
CXX=/usr/local/libexec/ccache/world-c++

then add the following to /.cshrc:
# set ccache varibles
setenv PATH /usr/local/libexec/ccache:$PATH
setenv CCACHE_PATH /usr/bin:/usr/local/bin
setenv CCACHE_DIR /var/tmp/ccache
setenv CCACHE_LOGFILE /var/log/ccache.log

# set ccache temp size to 512MB (default 1GB)
if ( -x /usr/local/bin/ccache ) then
  /usr/local/bin/ccache -M 512m > /dev/null
endif

[×] close

First get boot sector from FreeBSD:
# dd if=/dev/ad0s1a of=bootsect.bsd bs=512 count=1
place it int the C:\ directory:
# mv bootsect.bsd /mnt/windows
add FreeBSD entry to NT bootloader in C:\boot.ini:
C:\bootsect.bsd="FreeBSD"
[×] close

OS statistics generated by: stats_os.awk

date: 2006.*
 OS           6341  PERCENT
 --------------------------
 windows      3364    53.0%
 bsd          2187    34.5%
    freebsd   2098    33.1%
    openbsd     58     0.9%
    netbsd      31     0.5%
 linux         628     9.9%
 mac os        162     2.5%
date: 2007.1
 OS         102302  PERCENT
 --------------------------
 windows     43214    42.2%
 bsd         27937    27.3%
    freebsd  27641    27.0%
    openbsd    290     0.3%
 linux       27109    26.5%
 mac os       4042     3.9%
date: 2007.2
 OS         249251  PERCENT
 --------------------------
 windows    165890    66.5%
 linux       49107    19.7%
 bsd         24633     9.9%
    freebsd  23116     9.3%
    openbsd   1505     0.6%
 mac os       9621     3.8%
date: 2007.3
 OS         198460  PERCENT
 --------------------------
 windows    113643    57.3%
 linux       55522    28.0%
 freebsd     25365    12.8%
 mac os       3930     2.0%
date: 2007.4
 OS         469057  PERCENT
 --------------------------
 windows    288369    61.5%
 linux      112385    23.9%
 bsd         43679     9.3%
    freebsd  40749     8.7%
    openbsd   1970     0.4%
    netbsd     960     0.2%
 mac os      24624     5.2%
date: 2007.5
 OS         353132  PERCENT
 --------------------------
 windows    215551    61.0%
 linux       98604    27.9%
 bsd         31821     9.0%
    freebsd  30984     8.8%
    openbsd    828     0.2%
 mac os       6913     1.9%
 solaris       243     0.1%
date: 2007.6
 OS         244410  PERCENT
 --------------------------
 windows    125060    51.2%
 linux       87033    35.6%
 bsd         25794    10.5%
    freebsd  25482    10.4%
    openbsd    309     0.1%
 mac os       4367     1.8%
 solaris      2156     0.9%
date: 2007.7
 OS         226189  PERCENT
 --------------------------
 windows    107455    47.5%
 linux       66850    29.5%
 bsd         32228    14.2%
    freebsd  29817    13.2%
    openbsd   2399     1.1%
 mac os      18438     8.1%
 solaris      1218     0.5%
date: 2007.8
 OS         328240  PERCENT
 --------------------------
 windows    167460    51.0%
 linux       93254    28.4%
 bsd         44635    13.6%
    freebsd  41382    12.6%
    openbsd   2216     0.7%
    netbsd    1037     0.3%
 mac os      21372     6.5%
 solaris      1519     0.5%
date: 2007.9
 OS         155669  PERCENT
 --------------------------
 windows     72809    46.8%
 linux       51997    33.4%
 bsd         24575    15.8%
    freebsd  22663    14.5%
    netbsd    1824     1.2%
 mac os       6065     3.9%
 solaris       223     0.1%
date: 2007.10
 OS         224839  PERCENT
 --------------------------
 windows     90848    40.4%
 linux       83334    37.1%
 bsd         34977    15.5%
    freebsd  33290    14.8%
    openbsd   1458     0.6%
    netbsd     229     0.1%
 mac os      15445     6.9%
 solaris       235     0.1%
date: 2007.11
 OS           64576  PERCENT
 windows      28868    44.7%
 linux        23479    36.4%
 bsd          10696    16.6%
    freebsd    9236    14.3%
    openbsd    1458     2.3%
 macos         1460     2.3%
 solaris         73     0.1%
date: 2007.12
 OS           55731  PERCENT
 linux        22218    39.9%
 windows      20700    37.1%
 bsd          10905    19.6%
    freebsd    9502    17.0%
    netbsd     1158     2.1%
    openbsd     245     0.4%
 macos         1902     3.4%
[×] close

BROWSER statistics generated by: stats_browser.awk

date: 2006.*
 BROWSER       6265  PERCENT
 ---------------------------
 firefox       2403    38.4%
     2.0       1450    23.1%
     1.5        722    11.5%
     1.0        217     3.5%
 opera         2062    32.9%
     9.1        794    12.7%
     9.0       1240    19.8%
 msie          1335    21.3%
     7          114     1.8%
     6          503     8.0%
     5          714    11.4%
 netscape       166     2.6%
 safari         128     2.0%
 konqueror       90     1.4%
 camino           8     0.1%
 seamonkey       40     0.6%
 galeon          29     0.5%
 camino           8     0.1%
date: 2007.1
 BROWSER     100688  PERCENT
 ---------------------------
 firefox      49792    49.5%
     2.0      41241    41.0%
     1.5       8187     8.1%
     1.0        125     0.1%
 opera        27672    27.5%
     9.1      24960    24.8%
     9.0       2669     2.7%
 msie         15396    15.3%
     7         4434     4.4%
     6         7878     7.8%
     5         3083     3.1%
 konqueror     5801     5.8%
 netscape       713     0.7%
 safari         614     0.6%
 seamonkey      528     0.5%
 k-meleon        98     0.1%
date: 2007.2
 BROWSER     252143  PERCENT
 ---------------------------
 firefox     123865    49.1%
     2.0     105818    42.0%
     1.5      14312     5.7%
     1.0       3005     1.2%
 msie         63424    25.2%
     7        18967     7.5%
     6        39937    15.8%
     5         4517     1.8%
 opera        53378    21.2%
     9.2       2061     0.8%
     9.1      37808    15.0%
     9.0       9164     3.6%
 safari        5442     2.2%
 konqueror     3833     1.5%
 epiphany      1407     0.6%
 camino         745     0.3%
date: 2007.3
 BROWSER     213514  PERCENT
 ---------------------------
 firefox     132310    62.0%
     3.0        842     0.4%
     2.0     119104    55.8%
     1.5      11186     5.2%
     1.0       1153     0.5%
 msie         32696    15.3%
     7        13277     6.2%
     6        18887     8.8%
     5          530     0.2%
 opera        30490    14.3%
     9.2       2431     1.1%
     9.1      20719     9.7%
     9.0       5459     2.6%
 konqueror    14489     6.8%
 epiphany      1851     0.9%
 safari        1006     0.5%
 kazehakase     509     0.2%
date: 2007.4
 BROWSER     465491  PERCENT
 ---------------------------
 firefox     350544    75.3%
     3.0        859     0.2%
     2.0     299648    64.4%
     1.5      43706     9.4%
     1.0       3719     0.8%
 msie         53568    11.5%
     7        19999     4.3%
     6        31904     6.9%
     5         1669     0.4%
 opera        42530     9.1%
     9.2      23915     5.1%
     9.1      14606     3.1%
     9.0       2491     0.5%
 konqueror    10498     2.3%
 safari        3118     0.7%
 camino        2218     0.5%
 netscape       944     0.2%
 galeon         896     0.2%
 epiphany       629     0.1%
 kazehakase     473     0.1%
date: 2007.5
 BROWSER     354977  PERCENT
 ---------------------------
 firefox     182073    51.3%
     2.0     152091    42.8%
     1.5      19254     5.4%
     1.0       3393     1.0%
 msie         90045    25.4%
     7        17432     4.9%
     6        40544    11.4%
     5        32074     9.0%
 opera        63278    17.8%
     9.2      41421    11.7%
     9.1       9626     2.7%
     9.0       6613     1.9%
 konqueror    12286     3.5%
 galeon        2188     0.6%
 safari        1951     0.5%
 camino        1108     0.3%
 epiphany       991     0.3%
 seamonkey     1050     0.3%
date: 2007.6
 BROWSER     242608  PERCENT
 ---------------------------
 firefox     170321    70.2%
     2.0     150645    62.1%
     1.5      15735     6.5%
     1.0       2143     0.9%
 opera        37143    15.3%
     9.2      27060    11.2%
     9.1       5680     2.3%
     9.0       3131     1.3%
 msie         23696     9.8%
     7         5726     2.4%
     6        15420     6.4%
     5         3581     1.5%
 konqueror     9470     3.9%
 safari        1472     0.6%
date: 2007.7
 BROWSER     226879  PERCENT
 ---------------------------
 firefox     138522    61.1%
     3.0       1058     0.5%
     2.0     129873    57.2%
     1.5       4672     2.1%
     1.0        488     0.2%
 opera        36855    16.2%
     9.2      31343    13.8%
     9.1        569     0.3%
     9.0       3687     1.6%
 msie         32038    14.1%
     7         7072     3.1%
     6        14034     6.2%
     5        10924     4.8%
 safari       12153     5.4%
 konqueror     4997     2.2%
 epiphany      1067     0.5%
 camino         835     0.4%
 seamonkey      404     0.2%
date: 2007.8
 BROWSER     318133  PERCENT
 ---------------------------
 firefox     189046    59.4%
     3.0       1102     0.3%
     2.0     173011    54.4%
     1.5       8161     2.6%
     1.0       2534     0.8%
 msie         61455    19.3%
     7        25206     7.9%
     6        32913    10.3%
     5         4335     1.4%
 opera        35941    11.3%
     9.2      34029    10.7%
     9.1        404     0.1%
     9.0        775     0.2%
 safari       15246     4.8%
 konqueror    12345     3.9%
 seamonkey     2658     0.8%
 camino        1205     0.4%
date: 2007.9
 BROWSER     155654  PERCENT
 ---------------------------
 firefox      91357    58.7%
     3.0       1108     0.7%
     2.0      85120    54.7%
     1.5       3776     2.4%
     1.0        256     0.2%
 opera        39700    25.5%
     9.5       3619     2.3%
     9.2      33852    21.7%
     9.1        298     0.2%
     9.0        605     0.4%
 msie         18524    11.9%
     7         3298     2.1%
     6        14997     9.6%
     5          223     0.1%
 konqueror     4699     3.0%
 seamonkey      702     0.5%
 safari         400     0.3%
 epiphany       179     0.1%
date: 2007.10
 BROWSER     232421  PERCENT
 ---------------------------
 firefox     136194    58.6%
     3.0        762     0.3%
     2.0     126559    54.5%
     1.5       4922     2.1%
     1.0        460     0.2%
 opera        50430    21.7%
     9.5       4921     2.1%
     9.2      39964    17.2%
     9.1        299     0.1%
     9.0        263     0.1%
 msie         19864     8.5%
     7         8834     3.8%
     6         8353     3.6%
     5         2732     1.2%
 seamonkey     6679     2.9%
 konqueror     6276     2.7%
 safari        6040     2.6%
 camino        2933     1.3%
 epiphany      1572     0.7%
 galeon        1401     0.6%
 netscape       943     0.4%
date: 2007.11
 BROWSER      64976  PERCENT
 firefox      40696    62.6%
     3.0       1293     2.0%
     2.0      37449    57.6%
     1.5        881     1.4%
 opera        12068    18.6%
     9.5       2078     3.2%
     9.2       6400     9.8%
     9.1        142     0.2%
 msie          9639    14.8%
     7         1793     2.8%
     6         5430     8.4%
     5         2415     3.7%
 epiphany