Tag Archives: command line

Linux Command Line, Generating a Random File 2

It is very easy to create a random file using the linux command line. Much like the command to fill a file with all zeros, for example a 1 Meg file:
dd if=/dev/zero of=zero.filename bs=1024 count=1000
You do the same using /dev/urandom:
dd if=/dev/urandom of=random.filename bs=1024 count=1000
Resulting in a 1MB file:
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) [...]

Command Line Packet Sniff Existing Running Process in Linux 0

Have you ever come across a server that is doing a lot of traffic? Maybe you have logged in to see a process running at 100% CPU, so you know the culprit, but instead of kill -9ing it, wouldn’t it be great to see what exactly it is up to? Or even if you see [...]

Easy Search and Replace in Multiple Files on Linux Command Line 8

I recently came across a typo that existed in a bunch of html files on my web server. I thought it should be easy enough to change, but since it was in a number of files, editing it by hand would be time consuming. Fortunately, there is an easy, one liner command to replace the [...]