Why ‘export’ if i could just direct assign the variables in bash?

January 25th, 2011 mysurface

I can direct assign value to a variable in my bash shell why I still need the command ‘export’ ? What is the different between them? If you have doubts about this, please continue to read on it. Lets do an experiment in a bash shell: $ HELLO=world $ export HELLO2=world2 $ echo $HELLO $HELLO2 [...]

Posted in Bash, export | Hits: 128436 | 8 Comments »

Install RPM with yum

January 31st, 2010 mysurface

I am a Linux user for couple of years, and I am using fedora for quite sometimes too. To install the packages that I need, first I will check them out at my repository using yum. yum search something p.s Replace ‘something’ with your keywords. If I manage to obtain the package list, I can [...]

Posted in yum | Hits: 285554 | 11 Comments »

How to mount a ssh server?

September 18th, 2009 mysurface

After FUSE (Filesystem in Userspace) was invented, it opens up a lots of possibility to mount a remote filesystem on various protocol, such as FTP and SSH. FUSE is an API to implement a fully functional filesystem in a userspace program. I had wrote a post shares the idea how we can mount a ftp [...]

Posted in Admin, sshfs | Hits: 206619 | No Comments »

List command line history with timestamp

October 16th, 2008 mysurface

History is a common command for shell to list out all the executed commands. It is very useful when it comes to investigation on what commands was executed that tear down the server. With the help of last command, you be able to track the login time of particular user as well as the the [...]

Posted in Common, history, last | Hits: 209921 | 21 Comments »

Syslog: Sending log from remote servers to syslog daemon

July 23rd, 2008 mysurface

syslog is a standard for logging service in Linux, it usually run as daemon like syslogd or rsyslogd. Syslog daemon will be forward and store logs in /var/log directory, you may configure it to store at separate location if you want. (we will look into it later). And there is a major file that store [...]

Posted in Admin, logger, nc, rsyslogd, syslogd, tail | Hits: 190978 | 2 Comments »

WordPress exploit: we been hit by hidden spam link injection

May 26th, 2008 mysurface

We been hit by hidden spam link injection (a modified version of goro spam injection), this crack injects spam links through wordpress wp_footer() or wp_head() hook. The spam links only reveal itself if crawled by search engine bot such as googlebot, and they are hidden from our eyes. We believe the cracker’s purpose is to [...]

Posted in curl, curlftpfs, file, find, Misc | Hits: 179233 | 81 Comments »

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: 60782 | 2 Comments »

yum, can it be faster?

April 16th, 2008 mysurface

Recently I install fedora to my laptop instead of ubuntu or any debian based distro, the application that I concern the most is yum. I have bad experience on yum previous during fedora core 5, which I find it extremely slow. Therefore I search for some guidelines from my friend Kagesenshi who are extremely active [...]

Posted in Admin, yum | Hits: 35532 | 11 Comments »

a stupid way of internet sharing between two laptops

April 6th, 2008 mysurface

I always want to find an easy way to do an internet sharing between my two laptops. Well I figure out a way, which is really stupid! but well, for some extend, it works. I know there should be a proper ways to do that, but with the limited knowledge of networking, this is only [...]

Posted in Admin, ifconfig, ssh | Hits: 45447 | 8 Comments »

gcore: Obtain core dump of current running application

March 24th, 2008 mysurface

Core dump is always developer’s friends and can be admin user’s nightmare. Developer’s can always get some clue of what’s going wrong through the core files, given that the apps is compiled with -g. In order to get core dump generated, we must enable the core through ulimit. Generate coredumps to help developer for debugging [...]

Posted in Admin, Developer, gcore, gdb, pgrep | Hits: 68524 | 5 Comments »