Tag Archives: command line

How To List The Installed Packages on a Debian Based System

In this tutorial I’m going to show how to list the installed packages on a Debian based operating system, (Debian, Ubuntu, Mint, Sidux, CrunchBang, etc.) I got this gem of a command line one-liner from the Sidux website.

This command is useful if you want to replicate a GNU/Linux installation from one computer to another.

For those who are impatient, I’ll cut right to the chase. This command will create a file in your home directory called installed.txt that contains the listing of your installed packages. Open a terminal and enter: Continue reading

Command Line Basics: Bulk Rename Files With rename

Sometimes you get a bunch of files that are named in an annoying way and you’d like to change the naming convention for all of them. Maybe you forgot to change the settings on your CD ripping software and it ended up creating a bunch of long file names that you don’t like.

I recently received a bunch of files that stupidly had names starting with spaces and hyphens; ( – ). The files looked something like this:

linerd@laptop:~/demo$ ls -1
 - File number 1.txt
 - File number 2.txt
 - File number 3.txt
 - File number 4.txt
 - File number 5.txt

Starting a file name with a space is just stupid! For 5 files it’s no big deal to go in and manually rename them. I had many more files, so I was in search of a tool that could change many files all at once. The aptly named rename terminal command turned out to be a great solution. Continue reading

Command Line Basics: Cut Fields With awk

There are times when you will want to trim some information from the output of a command. This may be because you want to feed that output into another command. Whatever the reason for wanting to manipulate the output, awk is one of many tools available in GNU/Linux to perform this task.   Continue reading

Command Line Basics: Join Files With cat

I’ve already shown you how to view files with the cat command. In today’s post I’m going to show you how to use the GNU cat command for its originally intended purpose: for joining multiple files together.

For this example we’ll need a couple of text files to start with. Paste the following text into a text editor and save it as file1. Continue reading

Command Line Basics: View Text Files with more

One of the things you may find you want to do often from your command line is to view the contents of a text file. This could be to view the contents of some startup script or just one of your own basic configuration files like .bashrc or .bash_aliases. The command is simple to use. Just type more followed by the file name. Here’s an example (assuming you have X installed). Continue reading