Live Chat!

rpm and yum rescue tips on Fedora

1 votos Vota!!

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: 34226 | No Comments »

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

3 votos Vota!!

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, the [...]

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

writting executable script

2 votos Vota!!

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 your script into directory that exported [...]

Posted in Bash, Developer, chmod, file, python, sh, which | Hits: 30963 | 3 Comments »

query using debian packaging manager

0 votos Vota!!

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.
dpkg -l | grep [...]

Posted in Admin, backquote, dpkg, grep, pipeline, which | Hits: 20026 | 2 Comments »

check the file type

0 votos Vota!!

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 which to returns the full path [...]

Posted in Common, backquote, file, which | Hits: 13915 | 1 Comment »

allow root privilage GUI application run with user login.

0 votos Vota!!

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 privilage but running sudo [...]

Posted in Admin, gksudo, ls, sudo, which | Hits: 26957 | No Comments »

tabs in vim 7

0 votos Vota!!

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
:imap [...]

Posted in Text Manipulation, ln, vi, vim, which | Hits: 10516 | 1 Comment »