Live Chat!

rm complains argument list too long

* * * * * 2 votos

October 20th, 2007 mysurface

There is a limitation of rm command, where you can’t delete a large groups of files with *. For examples,
rm -rf something*
If there are large amount of files initiate with something, rm will fails and complains
/bin/rm: Argument list too long.
The solution is to make use of find, xargs and rm.
find . -name ’something*’ -print0 | [...]

Posted in Common, find, rm, xargs | Hits: 14062 | 5 Comments »

fstab with uuid

* * * * * 2 votos

October 10th, 2007 mysurface

When linux system starts, auto mounting partition will be done by refering to /etc/fstab. The file /etc/fstab will list down how you like the system to mount your partition. For examples,
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/sda1 [...]

Posted in Admin, blkid, ls, vol_id | Hits: 28206 | 13 Comments »

How to list just directories ( the correct way)

* * * * * 2 votos

September 21st, 2007 mysurface

I have wrote a post stated that there are no direct ways to list just directories, and wrote a bash scripts using find to list the directories. I had made a WRONG statement. We can list just directories with ls -d, thanks to Ntropia who leaves me a comment.
Before that I had tried hard to [...]

Posted in Common, ls | Hits: 16525 | 5 Comments »

How to list just directories

* * *     2 votos

September 19th, 2007 mysurface

There are no such direct ways to list only directories using the UNIX/ linux famous command ls. Anyway with command combo’s, we can achieve the goal in two ways shown as below.
1. use ls -l with grep
2. use find -type d
( The statement above is WRONG, check out the simple way to list just directories [...]

Posted in Bash, Text Manipulation, column, find, grep, ls | Hits: 24496 | 8 Comments »

Help yourself in man pages

* * * * * 1 votos

September 17th, 2007 mysurface

To know more about a command, check for more options and maybe some examples how to use it, you need to read the manual of the specified command. To access the man page of particular command is easy, just do the line below.
Let say I wanna access curl man page.
man curl
Or you can [...]

Posted in Common, man | Hits: 11891 | 1 Comment »

obtain core dump by aborting the running apps

* * * * * 1 votos

May 13th, 2007 mysurface

To obtain core dump, the line bellow is mandatory.
ulimit -c unlimited
Check out generate coredumps to help developer for debugging for more details of ulimit.
Core dump will be generated automatically if a program crashed due to segmentation fault or some other reason. But core dump will not be generated if an application halt and been terminate [...]

Posted in kill, pkill, ulimit | Hits: 22074 | 4 Comments »

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

* * * *   3 votos

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: 25642 | 4 Comments »

units of measurement

* * * * * 1 votos

May 1st, 2007 mysurface

To measure a quantitative object, we usually use certain standard of units. To measure width or length of a piece of paper, we may use inches, centimeter or meter. Sometimes, the conversion between one system unit to another might not be straight forward. For examples convert inch to cm approximately, 1 inch is 2.54cm, 1 [...]

Posted in Common, Misc, bc, units | Hits: 14032 | 2 Comments »

compromise copy and paste schemes in linux

* * *     2 votos

April 25th, 2007 mysurface

In Linux, usually we have two major schemes for copy and paste. We can copy by pressing control+c , paste by pressing control+v ( right click and select copy or paste in context menu) in various GTK/KDE application. Another ways of perform copy and paste is highlight the text and hit middle mouse click.
Certain application [...]

Posted in Common, autocutsel, nohup | Hits: 13830 | 1 Comment »

A complete zenity dialog examples 2

* * * * ½ 12 votos

April 22nd, 2007 mysurface

This is a continues post of A complete zenity dialog examples 1, in this post we will covers zenity dialog for progress, question, warning, scale, text info and list.
How to create zenity progress dialog?
Progress dialog is to track a progression of a routine, it can be anything, let say I want store the results list [...]

Posted in X11, lsof, tee, zenity | Hits: 40415 | 9 Comments »