Linux: check if a file is newer than another. test command is convenient; it can verify if a filename is a file or a directory and many other things, but it can also make age…
Linux: Check if a file or directory exists. More often than you will need to verify in your scripts whether a file or directory exists or not. To do this, you can use the test…
Create REST APIs with FastAPI A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST…
Linux: Create a one-line web server in bash that will execute shell commands. Do you want a quick, dirty, and unsafe way to execute commands to your Linux box over HTTP? You can use the following hack! I don't…
Linux: How to port forward only while a process uses a port. I work in an environment where the email servers are behind an SSH gateway, and sending emails through them is a pain since we need to do…
Simple and honest answers to difficult interview questions for IT (and not only) people. Note that I am not an HR person; I work in the IT industry, and my experience with interviews where on side of the candidate, but I believe…
Linux: find command most used cases Find command is one of the most valuable commands; it can find files and directories based on many criteria like age, size, and name. Let’s…
Solomons Paradox, what is and how to reverse it. King Solomon was famous for being wise when he had to deal with the problems of others but performed poorly with his problems; This…
csvkit: query csv files using SQL from the command line csv is the most common file format that you will use when you deal with data; all major spreadsheets like Excel or Libre Office Calc…
Linux: Constantly rsync two directories. Assume you have two directories that needs to be constantly synced, not just every one minute by using a cronjob but as soon as possible…