rpm and yum rescue tips on Fedora

April 22nd, 2008 mysurface

You have to be careful when you run yum update and yum install, DON’T force kill it, kill -9 or pkill -9. Those action are consider very dangerous, may lead you to losing certain files. Seriously, I hate yum, when I really wanna cancel the process in the middle, by hitting ctrl+c doesn’t really work! […]

Posted in Admin, awk, rpm, which, yum | Hits: 96560 | 3 Comments »

CLI Magic: command not found, suggest what to apt-get

May 5th, 2007 mysurface

I have recently upgrade my Ubuntu Edgy to Ubuntu Feisty and I discover a fantastic CLI magic packaged with Feisty, its call command-not-found. With command-not-found package, when you have type some command that doesn’t exist in your terminal, it will suggest you what to install. Let say I type trafshow, which It is not installed, […]

Posted in apt-get, Bash, command-not-found, which | Hits: 75760 | 7 Comments »

writting executable script

October 8th, 2006 mysurface

Shell script (sh), Bash script (bash), Python and perl are all scripting language. By default, to run a scripting file, for example Python script, you need to do this: python myscript.py Another example for shell script: sh myscript.sh But we make is executable and can execute by running directly like this ./myscript.py If you place […]

Posted in Bash, chmod, Developer, file, python, sh, which | Hits: 113757 | 23 Comments »

query using debian packaging manager

September 24th, 2006 mysurface

I am here to show you two examples of using dpkg to query package info. To know what deb package is installed, you can do this dpkg -l Usually we do this with grep, to filter only info that we are interested in, let say i want to know the packages consist of keyword gcc. […]

Posted in Admin, backquote, dpkg, grep, pipeline, which | Hits: 66899 | 5 Comments »

check the file type

September 23rd, 2006 mysurface

A command file is a good tool to help you determine what file type of a file. To check for a file type simply do this file filename Let say i want to check the file type of command line update-rc.d, i can do this file `which update-rc.d` output: /usr/sbin/update-rc.d: perl script text executable Uses […]

Posted in backquote, Common, file, which | Hits: 44339 | 3 Comments »

allow root privilage GUI application run with user login.

September 21st, 2006 mysurface

For running root access GUI apps under user login desktop, you can do this at fedora, and other red hat based distro. sudo gnome-terminal This will not run correctly at ubuntu or debian based distro, you need to do this in ubuntu gksudo gnome-terminal As you can realized that such apps like wireshark needs root […]

Posted in Admin, gksudo, ls, sudo, which | Hits: 72128 | 12 Comments »

tabs in vim 7

August 15th, 2006 mysurface

This was amazing when I get to know that vim can do tab. Okay to do that, it is easy, what you need is to do a key binding. Create a file .vimrc into your home folder, and paste the lines bellow into it. :map <F4>:tabprevious<cr> :map <F3>:tabnext<cr> :map <C-t>:tabnew .<cr> :imap <F4>:tabprevious<cr>i :imap <F3>:tabnext<cr>i […]

Posted in ln, Text Manipulation, vi, vim, which | Hits: 51411 | 2 Comments »