Video advanced Linux commands. In this video, we will learn about advanced Linux commands for the Raspberry Pi. Let's say you want to search string in a text, you can use a powerful tool called grep. To search for something in a file, or to filter the output of another command or script. For example, hello hello hyphen world.sh will look in all the files in the current directory. The grep command supports regular expressions, which allows a special letter combinations to be included in the search.
If you want to read more about any of the Linux commands, you can use the man command followed by the command. It gives the manual page of a particular command. For example, type man grep and press enter to view the manual of the grep command. If you are lost and could not find a lost file, there is a command lets you search and locate the file with its file name. It's called the find command. Type find, followed by the directory to search for, then followed by a hyphen I name, then followed by the file name inside quotes.
Using hyphen I name instead of hyphen name ignores the case of your query. The hyphen name command is case sensitive. To know about all the running processes on your Raspberry Pi four, you can use the PS command to display all the running process enter PS Ops, you can also display the process started by a specific user using PS if a new followed by user name. Now once you look at the process list, if you want to stop some process, use the Kill Command followed by the P ID or the process ID. The Raspberry Pi four tends to get quite hot sometimes done It's always a good idea to know the following command to monitor the CPU temperatures. Enter visit Gen Z and the measure underscore temp to get the temperature of the CPU.
If you are facing some boot issues with a Raspberry Pi, you can use the DMS g command. It will show you every event that happened in the start sequence. Here you can see errors with drivers or services and understand why something doesn't work the way you want. A very powerful tool for network monitoring is called netstat. For example, you could see every port open and every traffic flow netstat is a complex tool as it has a lot of capabilities. Entering netstat hyphen l allows you to see every port and traffic flow.
Go to the manual page of netstat to know more by topic, man netstat. You are already famous With LS hyphen L, which lists file with permissions. But what if you want to change the permissions of a file, then you need to know to use the CH mod command to use ch mode. To change file permissions, you have to tell it three things. One, who you are setting permissions for, to how you're setting them. Three, what you're setting them to.
I will explain with an example sudo ch mode a plus w file name, or file path. Selecting Whoa. The following table shows you how to pick a letter to tell the command who you are setting the permissions for you means the owner of the file, g means the file group. All means everyone who is in the owner of the group. A means everyone selecting how next you specify how you want to change the permissions. The following table has the details.
Plus means add or turns on a permission minus remotes or turns of a permission equal to ignores current permissions and sets some new ones. Selecting what the following table shows you which letters to type to select the different permissions. Are means read permission. W means write permission. x means execute permission. capital X means special execute permissions for folders.
I will now show the CH mod command in action. Here you can see that the file permission has changed. After I used the CH Mark command, like shown here. The LS hyphen l command reveals that the file permission has indeed changed. Here is a before and after permission info of the same file summary. In this video, we have learned some advanced the next commands and then functions.
In the next video, we will learn to automate and schedule tasks in Raspberry Pi flow.