12/5/2023 0 Comments Raspberry pi system monitor linuxpwd: Pwd lets you see in which directory you are.And if you want to learn options to quickly find a file on Raspberry Pi, you can also read this other article on the topic. There are many options to help you find the good file (size, last modification date, …). find: As the name suggests, find is useful to locate files on your Raspberry Pi.tar -x: It’s the same command but to extract files.tar -cvfz /home/pi/Documents/mydirectory It’s often used with gzip to compress files. tar -c: You can use tar to store files into an archive.Using it on system folders will delete everything without any warning message, and can break your system in a few seconds. For a folder, add option -rf (recursive and force)īe really careful if you are using sudo with this command. You’ll find all actions available at the bottom of the screen. It allows you to edit a file, and save your changes with (CTRL + O, Enter, CTRL + X). It would need an entire article to go into detail ( I have done it since, click here to read more about it ^^). If you like this tool, I recommend you read the man page to know exactly what you can do with it. Grep -v 'Notice' /var/log/apache/error.log Grep -A2 -B4 'Fatal error' /var/log/apache/error.log You can also use -v to display everything except the input string. var/log/syslogĪs I say, you can use it on a file or a script output:Īnd finally, there are a lot of options to use with grep, like regular expressions or options to display lines before (-B), after (-A) or around (-C) the search string. Grep dhcp DHCP, or Dynamic Host Configuration Protocol, is a system that automatically assigns IP addresses to. You can use it to search something in a file or to filter the output of another command or script. grep : Grep is a powerful tool to search string in a text.head : It’s the same as tail but to display the beginning of a file.You can specify the number of lines to display with -n.Īnd finally, my favorite is the option -f to displays new lines in real-time. tail : Tail allows you to display the end of a file, it’s useful to check new entries in a log file.more : Displays the content of the specified file, page per page (enter or space to continue, q to quit).cat : Displays all the content of the specified file.mv : Moves a file or a directory to another location.cp : Copies a file or a directory to another location (to copy a complete directory you need to add the -r parameter for “recursive”).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |