Welcome to the next pikoTutorial! Bash comes with a bunch of useful, built-in commands. One of them is timeout which allows you to run another command with a time limit. The syntax is simple: To avoid providing large numbers for long timeouts, duration parameter accepts suffixes which mark the exact…
Linux
How to search the internet from Linux terminal?
Welcome to the next pikoTutorial ! Linux terminal is a basic tool for many software engineers and the place where we often spend a lot of our time during the work day. Even if you’re not doing anything in the terminal right now, it is for sure opened for the…
How to convert hex to dec in Linux terminal?
Welcome to the next pikoTutorial ! Conversion from hexadecimal to decimal Add the following function to your .bashrc file: Usage: Conversion from decimal to hexadecimal Add the following function to your .bashrc file: Usage:
Simple menus in Bash scripts with select
Welcome to the next pikoTutorial! The select keyword in shell scripting provides an easy way to present a list of options to the user and handle their selection. It is particularly useful when you have a predefined set of choices and want the user to pick one. When you run…
Data transfer with curl
Welcome to the next pikoTutorial! Short for “Client URL,” curl is a command-line tool and library for transferring data with URLs. It supports various protocols, including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, LDAP, and more. Basic usage At its core, curl allows you to fetch content from or send content…
Linux and hash command
Welcome to the next pikoTutorial! What is hash? The hash command in Linux is a built-in shell utility used to optimize the execution of commands by recording paths of the invoked commands, so subsequent executions don’t need to search through the PATH variable again. You can see it in action…
Hard links in Linux
Unlike symbolic (soft) links, which point to a file by its pathname, hard links are direct pointers to the file’s inode.
How to use xargs on Linux?
Welcome to the next pikoTutorial! xargs reads items from standard input, delimited by blanks or newlines and executes the specified command with those items as arguments. Basic usage The most basic pattern of using xargs commands consists of 4 elements: Examples Create files basing on a text file Let’s assume…
Arrange text with sort on Linux
At its most basic, the sort command sorts lines in a file alphabetically. For example, if you have a file named data.txt, you can print its sorted content with:
How to read ip addr output on Linux?
ip command was designed to replace older networking tools like ifconfig, route or netstat. Learn about how to decode ip addr output.