Live Chat!

Wordpress exploit: we been hit by hidden spam link injection

          0 votos

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 Misc, curl, curlftpfs, file, find | Hits: 15999 | 9 Comments »

Discover user guides and manuals within your linux system

          0 votos

May 9th, 2008 mysurface

Do you realized that we can obtain a lots of user manuals and guideline documents from our system? There is a folder /usr/share/doc, you may find some useful docs already preinstalled by your distro. Those docs are in pdf or html format. I manage to find user manuals for valgrind, ipython, systemtap, boost etc.
I believes [...]

Posted in Common, echo, find | Hits: 18424 | 2 Comments »

Simple use of find to search for files in command line

* * * *   1 votos

May 2nd, 2008 mysurface

Find is a very strong command to search for files and folders. You can search for files based on certain criteria besides filename, such as file types, atime, belongs to which groups, file modes, etc. Because find command support a lots of options, therefore sometimes find command line looks very complicated, but actually it is [...]

Posted in Misc, file, find | Hits: 19180 | No Comments »

rpm and yum rescue tips on Fedora

          0 votos

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

where is my command binaries and its configurations?

* * * *   1 votos

February 9th, 2008 mysurface

When we want to find out the absolute path for a command, we will usually use which.
For examples, if I want to check out the absolute path for mplayer, I may do this:
which mplayer
But there is another command can search for the binaries as well as configs and man pages.
whereis mplayer
And it will return this:
mplayer: [...]

Posted in Common, whereis | Hits: 16790 | No Comments »

Obtain some system statistics from vmstat

* * * * * 1 votos

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, you want to [...]

Posted in Admin, date, tail, vmstat | Hits: 27576 | 4 Comments »

How to redirect output to a file as well as display it out

* * * * * 1 votos

December 6th, 2007 mysurface

To redirect standard output to a file is easy, you just need to use the redirection symbol, for example:
echo “hello world” > test.txt
But what if I want to display it out as well as store into a file?
Answer: tee
echo “hello world” | tee test.txt
Okay it seems very easy, how about append?
Related PostsRedirect stderr to stdoutVery [...]

Posted in Text Manipulation, pipeline, python, tee | Hits: 25902 | 1 Comment »

stupid way to make mplayer repeatly play

          0 votos

November 3rd, 2007 mysurface

I am so desperately wanna make mplayer repeat a song, somehow I obtain a song in flv format. I fail to figure out how to make mplayer repeat, so here make a stupid workaround with bash for.
for (( ; ; )); do mplayer nicesong.flv; sleep 0.1; done
Kill it by hitting ctrl+c two times very fast!
heh! [...]

Posted in Bash, for, mplayer, sleep | Hits: 19587 | 12 Comments »

what is your 10 common linux commands?

* * * * * 2 votos

October 27th, 2007 mysurface

Dear command line ninjas, Mr CLI and keyboard pianist:
What is your regular command you use? I am sure you must thinking of ls and cd. Yeah, they are common for every users, but how about the rest of them? I have construct a combos of commands to help you identify your top ten linux command. [...]

Posted in Common, awk, column, grep, head, history, nl, sort | Hits: 19587 | 20 Comments »

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: 13080 | 5 Comments »