Category Archives: Raspberry Pi

Raspberry Pi Linux LESSON 9: Using the Linux Sort Command

In this lesson we explore a new and very powerful Linux command . . . the sort command. The sort command allows you to sort a file alphabetically, numerically or by calendar month. We show how to sort forward or backward, and how to send the sorted list either to a file or to the terminal window. This quick video will get you up to speed on sorting in Linux.

Raspberry Pi with Linux LESSON 8: Sending Linux Command Output to a File

This lesson shows that we can redirect the output of our Linux commands to a file instead of the terminal window.

If we have a command like:

$ ls

The output is the list of files and folders in the current directory. If we instead want to send the output to a file we could use the followingg:

$ ls >out_file.txt

The list of files and folders is directed to a new file called out_file.txt.  Note that all the same rules for paths still applies.

If we issued the command again, the old contents of the file would be overwritten. If we wanted to append the results to the end of the file instead of overwriting, we could do the following:

$ ls>>out_file.txt

When we use >> instead of >, the results will be appended to the end of the file.

Raspberry Pi with Linux LESSON 7: Using the Wildcard

In this lesson we learn how to use the Linux wildcard. The wildcard allows you to automate what would otherwise be tedious tasks. The wildcard is the * character. For example,  a command with *.txt would affect all files ending in .txt. Similarly, *.* would affect all files. You could also imagine dog*.txt would affect all files that start with “dog” and end with .txt. The video gives many examples of using the wildcard to simplify things.

Raspberry Pi Linux LESSON 6: Move, Copy, and Delete Files and Folders

In this tutorial we learn how to move, copy and delete files and folders in the Linux terminal window on the Raspberry Pi. These will allow you to start working with files and folders like a pro. Please watch the video above and follow along on your Raspberry Pi. It is really important that you become proficient at navigating the files from the terminal window and command line, and you know how to move, copy and delete files.

Raspberry Pi Linux LESSON 5: File Naming Convention for Files and Folders

Windows is pretty forgiving in how you name your files and folders. In Linux, you must remember that things are case sensitive, and you want to avoid using spaces in your file names and folder names. Also remember, that in linux folders are also called directories. This video shows three suitable naming conventions in Linux that allow the files names to be both descriptive and readable.

Raspberry Pi Linux LESSON 4: Creating and Editing Text Files Using Nano Command

As we learn more about the Raspberry Pi, we will get to the point that we will need to write programs. We have learned how to write python programs in our earlier tutorial series on the Arduino. Good news is that we can apply what we learned there to the Raspberry Pi. But, we will first have to learn how to create and edit text files. The text editor we will use on the Raspberry Pi is called “nano”. We will learn how to use nano by creating and editing simple text files. Also in this lesson we learn how to make new directories in Linux using the mkdir command. We also learn that we can view a file without opening it by using the “cat” command.

Watch the video above for all this information. These concepts are best taught and learned by watching and doing. So, watch the video and do the commands along with me. You will be an expert in no time!