Get a list of your Route53 subdomains using aws cli docker image


You would like to have a list of your subdomains for a specific domain (hosted zone), that are hosted in Amazon’s Route 53.


You can install the aws cli docker image from here if you don’t want to install the aws cli in your computer.

You can afterwards start the container with:

docker run -it cgswong/aws:latest

Then configure it by running the following and adding your credentials and zone:

efe9881d4fd:/tmp# aws configure
 AWS Access Key ID [None]: aws_access_key_id
 AWS Secret Access Key [None]: aws_secret_access_key
 Default region name [None]: eu-central-1
 Default output format [None]:

Then run the first command to get a list of the hosted zones and get the id of the hosted zone you want to find the subdomains for:

3efe9881d4fd:/tmp# aws route53 list-hosted-zones
    "HostedZones": [
            "ResourceRecordSetCount": 2, 
            "CallerReference": "RISWorkflow-RD:xxxxx", 
            "Config": {
                "Comment": "HostedZone created by Route53 Registrar", 
                "PrivateZone": false
            "Id": "/hostedzone/HOSTEDZONEID", 
            "Name": ""

Then pick the HOSTEDZONEID and run the following to get a list of subdomains for that domain:

3efe9881d4fd:/tmp# aws route53 list-resource-record-sets --hosted-zone="HOSTEDZONEID" | grep "Name" | uniq

   "Name": "",                                                                                                                                                                                                                                             
   "Name": "",                                                                                                                                                                                                                                       
   "Name": "",

Find your public IP address from linux command line


You would like to find out your public IP from the command line without using an online service


Use dig like the following line (taken from

dig +short

you could also add it as an alias:

alias myip=”dig +short”

Find your Thinkpad (X1) model type in linux


You would like to find out the exact model from your Thinkpad X1 laptop, by using your linux command line.


Use the following command:

kosmas:$ sudo dmidecode | grep -A3 '^System Information'
[sudo] password for kosmas: 
System Information
        Manufacturer: LENOVO
        Product Name: 20HRCTO1WW
        Version: ThinkPad X1 Carbon 5th

Get a list of directories with user permissions


You want to run a command in a hosted server but you don’t have su permissions. There are directories that have different owners/permissions, so you would like to see them.


Use the tree command and save the output in a file if you have many directories:

tree -pufid /home/directory_to_check > /home/user/permissions.txt

taken from the answer here: