umask: create new files with specified file mode

March 8th, 2008 mysurface

Did you realized that every time we create a new file in Linux, it always been set with certain file mode? Lets see this: touch testing ls -l testing -rw-r–r– 1 mysurface mysurface 0 2008-03-08 01:14 testing Refers to the chmod examples post, read, write and executable permission value is 4, 2 and 1. In […]

Posted in Admin, touch, umask | Hits: 61734 | 2 Comments »

Obtain some system statistics from vmstat

December 8th, 2007 mysurface

vmstat know as virtual memory statistics reporter, but it gives more information the just only virtual memory. Besides memory, it covers overall CPU usage, IO, Swap, Proc, System interupts and context switching. vmstat is pretty easy to use, ignores all other options, the normal usage will be looks like this: vmstat [delay] [counts] Let say, […]

Posted in Admin, date, tail, vmstat | Hits: 112293 | 12 Comments »

Mounting ftp host to local directory on top of FUSE

November 17th, 2007 mysurface

I have wrote a post regarding on how to access ftp host using curl. And this time, let us look at how to mount the ftp host to a local directory on top of FUSE. FUSE (Filesystem in userland) is a userland build on top of virtual filesystem, it allows you to implement functional filesystem […]

Posted in Admin, curlftpfs, mount, sudo, umount | Hits: 135624 | 20 Comments »

Setup your own apache server to host your weblog free

November 1st, 2007 mysurface

Do you feel like you want to create your own blog? Earn some side income through blogging by putting adsense, advertlets, or some other ads? But you want to start it up free of charge, just to try it out. You may think of blogspot. Google has provided a free blog space with tools for […]

Posted in Admin, Beginners, mysql | Hits: 44599 | 8 Comments »

fstab with uuid

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 /media/sda1 vfat default,umask=077,gid=46 0 0 /dev/sda1 is the device, the number will be change […]

Posted in Admin, blkid, ls, vol_id | Hits: 414718 | 198 Comments »

mysql command lines

September 30th, 2007 mysurface

You extract info from mysql databases easily by execute the command line mysql -e. The results of sql statements can be save into various format of files, such as plain text without ascii table borders (batch mode), html (with table tags, such as td,tr,th) and XML. You are able to dump an sql scripts ( […]

Posted in Admin, mysql | Hits: 68696 | 4 Comments »

How to shutdown and reboot without sudo password?

September 25th, 2007 mysurface

If you are gnome user, you probably enjoy shutdown with just a click on the dialog. In order to shutdown from command line, you are requested to be either root or using sudo, such as sudo shutdown -h now For more detail examples of shutdown, continue to read here. With sudo, you need to type […]

Posted in Admin, chmod, shutdown, sudo | Hits: 217303 | 25 Comments »

Writing scripts that needs root permission

September 2nd, 2007 mysurface

While executing commands that needs root permission, I rely on sudo. Sudo provides me a very convenient way to execute root privilege commands from my user account provided with my user account password. Sudo and su are not the same, check out more from here. When comes to scripting, I couldn’t use sudo directly. For […]

Posted in Admin, Bash, sudo | Hits: 77717 | 17 Comments »

access delays through ssh

July 31st, 2007 mysurface

I have discovered access delays every time I want to login to another remote machine through ssh. ssh mysurface@ It took few seconds delay before it prompts me for password. It is so irritating! And very funny, it doesn’t happens on other windows ssh client. It must be ssh config that causes the ‘delays’. I […]

Posted in Admin, ssh | Hits: 40718 | 2 Comments »

how to ssh without password

July 18th, 2007 mysurface

Search though google, there are a tons of tutorial for accessing a remote site through ssh without a password. I found some tutorial gives too much details. Sometimes, detail’s explanation may confuse the beginners. I just want to make things done, I don’t want to know too much about the public key, private key and […]

Posted in Admin, ssh, ssh-copy-id, ssh-keygen | Hits: 118993 | 22 Comments »