Posts tagged shell
Finding Files with locate
Many Linux users use the ‘find’ utility when searching for files using the command line on their system. They’ll do a simple:
find / -name 'pattern'
Really though, the power of find isn’t just in finding names of files but rather specific details about those files. For example, if you wanted to find files which are w [...]
Convert PNG to GIF via Command Line
I installed a bare bones Arch Linux system today and took a screenshot. With no graphics utilities installed, I needed a way to convert a PNG to a GIF for a Simple Machines forum template thumbnail. I figured I’d use a command line utility to help me and ImageMagick is installed by default on most distributions. A quick read through [...]
Read & Display Single Line of a ...
Sometimes when I’m troubleshooting a PHP error and a function is called in the debugger that gives me a line number of a file to look at, I want to know what that line says without opening up the file. Using the command line, you can accomplish this in the following way:
head -n 96 filename.php | tail -n 1
This allows you to quickly di [...]