Can be useful when chainging commands together in scripts etc: sleep 5 Will ause a pause of 5 second
Category: Command Line
COM Ports(1)
Command Line Window Tools(1)
File System(4)
IO Pins(2)
Package Managers(1)
Permissions(1)
SSH Tools(1)
wget(1)
Soft Reset
For the Debian installation at the command prompt enter: sudo shutdown "now" -r You can also use: sudo reboot The full file path for this command (if you needed it for specific uses) is: sudo /sbin/reboot
sudo
Becoming the root user sudo su Which users are allowed to use sudo You can use this command to open the sudoers file: sudo nano /etc/sudoers BE VERY CAREFUL TO COPY THIS FILE BEFORE YOU CHANGE IT – IF YOU MAKE AN ERROR YOU CAN STOP YOURSELF BEING ABLE TO OPEN THE FILE USING SUDO (changes […]
tar, for zipping files, directories, etc
Show all options tar –help Create Archive Of Specific Files tar -vfcz outputfilename.gz inputfile1 inputfile2 Zipping Files And Directories Use this to move to the directory containing the files and / or directories you want to zip cd projects/myfolder Zip 1 File tar -vczf zip_output_filename.gz file_to_zip.a Zip 2 Files tar -vczf zip_output_filename.gz file_to_zip1.a file_to_zip2.a Zip A […]
Text Files – Editors
nano (Better than vi) sudo nano /etc/apache2/sites-enabled/000-default vi sudo vi /boot/cmdline.txt
Text Files – Viewing
Viewing Text Files head – View the start of a text file Show the first 20 lines: head -20 /home/pi/mytextfile.txt tail – View the end of a text tile Show the last 20 lines tail -20 /home/pi/mytextfile.txt