- Published:
- January 31, 2010 – 9:53 pm
- Author:
- By Dave
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) [...]
Categories: Code Samples, Linux, Security, Shell
Tagged: command line, Linux, tips
- Published:
- July 21, 2009 – 9:57 am
- Author:
- By Dave
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 [...]
Categories: CentOS, Code Samples, Linux, Shell, System Administration
Tagged: command line, Linux, network, Security, system admin, traffic
- Published:
- May 6, 2009 – 11:10 pm
- Author:
- By Dave
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 [...]
Categories: CentOS, Other Code, Shell, System Administration, Ubuntu
Tagged: command line, Linux, tips