One of the most powerful features of the Linux command line interface, (and other shells that conform to the POSIX standard) is the ability to pipeline output from one command as the input to another. This is done using the vertical bar or pipe character [ | ]. Continue reading
Tag Archives: command line
Command Line Basics: Redirecting Output
In today’s command line basics, I’m going to show you how to redirect output from the bash cli (command line interface). The output of most GNU command line tools is normally sent to the terminal (ie – standard output). There are times when you would like to have the output saved as a file. Now, you could copy the text from the terminal and paste it into a text editor and save it, but there’s a better way. Continue reading
Command Line Basics: View Files With cat
There are many ways to view files in GNU/Linux. One of the simplest command line tools for viewing files is cat. The cat command, short for concatenate, is actually intended for joining multiple files into one, but it works equally well for viewing text files. Continue reading
Command Line Basics: Determine File MIME Types
I recently wrote a script to watermark all of the image files in a directory. Most of the images I use on this website are PNG files, but I occasionally use JPGs. The challenge in my script was to find all of the image files in the directory regardless of image type.
After a bit of web research I discovered the file command. The file command takes a list of files as input and outputs the file names along with file type. Continue reading
How To Watermark Images With ImageMagick in Linux
I recently discovered that one of my most popular posts had been poached by another blog with out providing credit – images and all. I decided that it would be best to watermark my images to make it more difficult to rip off my content.
This procedure could also be done easily in GIMP, but it takes time to open up each image and then import or create the watermark text. Instead I created my desired watermark text in GIMP and saved it as a separate file called Watermark.png. This file has a transparent background, so only the text will show up when it’s overlaid on another image. Continue reading