Skip to main content


Showing posts with the label AWS

Create a new text file with content in Linux

Touch command in Linux will create an empty file in Linux command line. If no other parameters is specified whether a line will be inserted to the newly created file.
Cat command is for reading files via command line but it can also be used to create a file in Linux terminal window command line.
Cat command below will create a file called “test_comment.txt” and with the content or the line of “Hello World of Touch and Create File” on the file created.
Here’s the shell command:
cat  <( echo “Hello World of Touch and Create File”)  >  test_comment.txt
Note that there is no space between “<(“, if there is a space then the command will not work as expected.
Touch command to create a new file and also insert a new line or insert a string on the newly created file.
Here’s the shell command:
touch touch_file_comment.txt; echo “Hello World of Touch, insert this line.” >  touch_file_comment.txt

Basically, the command executes two commands separated by “;” semi-colon. The first part is to cr…

How to check unattached snapshot in AWS?

Checking unattached snapshot is a good technique to save some storage cost; of course, you need to do what’s the best thing after checking unattached snapshots.

If you are confident that the snapshot won’t be needed anymore, then it has to be deleted or else you will be incurring costs for nothing.
Every space on the cloud is not free, any space usage is an added cost to your pocket.But then how do you check for unattached snapshot in AWS?
There are quite a lot of ways you can do, if you love PowerShell it can be done in PowerShell; if you want to do it in Python with Boto3 it can be done as well.
Of course, in PowerShell and Python if this is the preferred method then you need to create some code. It won’t just spit out for you what are the unattached snapshots in your AWS account.
Enough said, the easiest way to search or look for unattached snapshot is just to search using the AWS EC2 console.
Open your browser, login to your EC2 console and search for: vol-ffffSee image below: vol-ffff w…