So once you have the SD card ready with Raspbian OS , the usual way is to connect a HDMI monitor , keyboard etc directly to the pi and once boot up you can further configure . Here we show how to enable SSH and configure a wifi on the first boot , so...
If you are wrapping shell commands with Python modules you might see this error a number of times . This usually happens when you grep some output from a command and assign it to a variable and then you will need to use that variable in another command . So there will be a...
Python allows you to run shell commands which you can use in your automation tasks and manage to start other serverside programs . Some of the useful python modules to execute shell commands are : You can immedeatley execute a shell command with the os.system command os.popen module opens a pipe from command prompt...
Sonetimes you need to run shell commands in your Python script, there are few different modules in python for that and the subprocess is one of those . Then you might need to copy the output of your shell command to a log file . This can be usually done with the append (>>)...
Sometimes we need to use postfix as a relay SMTP server . This is needed if you have devices on your network that generates system emails and sent it to your mail. In most cases , it ends up in spam folder if you don’t have a proper relay server for these emails ....
The netstat and the lsof are the two main commands to check the tcp/udp listening ports in Linux. Netstat Installation: CentOS and Debian: To show established tcp connections : To show only UDP connections: If you are looking for a specific service listens to which port : Filter with specific port number : lsof...
Sometimes you need to run the aws cli commands from the cronjob especially if you have the backup scripts that runs periodically and uploads to S3 bucket storage. So you might see the cron jobs run successfully as scheduled but the upload to S3 storage which uses the aws cli commands might not work...
You might need to zip a number of files, folders and sub folders to keep as a backup . To zip the folders and subfolders: This will create a new gzip file of your entire folder mydir/ no matter how many files or sub folders in that To untar a gzip file : So...
So when I try to upload a folder with lots of files , I started getting the above error . I am using the aws cli command to copy the files to the s3 bucket Full error: so you need to add a recursive flag along with command : This will clean that error...
OpenSSL can be used to encrypt/decrypt the files and can also be used to secure the communication channels . I touched a file file.txt To encrypt the file : Now to decrypt the file file.enc: The encryption requires a password and the same password will be asked to decrypt the file. But the password...