Handling File Name With Space

commandline session $ > test file Usage: file [-bchikLlNnprsvz0] [–apple] [–mime-encoding] [–mime-type] [-e testname] [-F separator] [-f namefile] [-m magicfiles] file … file -C [-m magicfiles] file [–help] $ls test $ls -l total 0 -rw-r–r– 1 jeffrin jeffrin 0 Nov 8 23:59 test $> “test file” $ls test test file $ls -l total 0 -rw-r–r– …

watch – execute a program periodically

commandline session following commandline session may not be accurate. $vmstat procs ———–memory———- —swap– —–io—- -system– —-cpu—- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 0 2246368 32720 497284 0 0 217 10 236 436 3 1 92 3 $watch vmstat $watch -n 0.5 vmstat $watch …

GNU/Linux Command: Viewing Resources

commandline session $df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 224G 7.5G 205G 4% / udev 10M 0 10M 0% /dev tmpfs 336M 664K 336M 1% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 672M 19M 1004M 3% /run/shm $du -sh /etc/ du: cannot read directory ‘/etc/polkit-1/localauthority’: Permission denied du: cannot read directory …

GNU/Linux Commands for Beginners: which and whatis

commandline session $which ls /bin/ls $which firefox /usr/bin/firefox $which grep /bin/grep $which whatis /usr/bin/whatis $whatis which which (1) – locate a command $whatis whatis whatis (1) – display manual page descriptions $whatis linux linux: nothing appropriate. $whatis kcore kcore: nothing appropriate. $whatis mysql mysql: nothing appropriate. $whatis locate locate (1) – find files by name …

GNU/Linux command : Changing Passwords

commandline session $sudo – [sudo] password for jeffrin: sudo: -: command not found $ $su – Password: root>passwd -e jeffrin passwd: password expiry information changed. root>exit logout $login jeffrin login: Cannot possibly work without effective root $sudo login jeffrin [sudo] password for jeffrin: sudo: Account or password is expired, reset your password and try again …

Git server and SSH Debian HOWTO

the following content may not be accurate and detailed Server 1. apt-get install git 2. apt-get install git-daemon-sysvinit 3. mkdir -p /home/user/project.git 4. cd /home/user/project.git 5. git init 6. git config –global user.name “Your Name” 7. git config –global user.email “you@example.com” 8. git commit -a 9. touch .git/git-daemon-export-ok 10. git config –bool core.bare true 11. …