Linux awk command examples

The awk command is a versatile tool for processing text, enabling users to scan files or streams, match patterns, and perform custom actions on the matched data

Here are useful examples of the awk command 😎👇 #sysadmin #opensource #devops

Find high-res pdf books with all my #Linux related infographics at https://study-notes.org

2025/4/27 Edited to

... Read moreThe awk command is a powerful tool widely utilized in data processing and reporting. It excels at scanning files and streams, allowing users to extract and manipulate data effortlessly. Here are some key examples of awk command usage: 1. Print Specific Fields: Use commands like 'awk '{print $2, $3}' my.txt' to print specific fields separated by a space. You could also separate values with a comma by using 'awk '{print $2, $3}' FS=',' my.csv'. 2. Condition-Based Filtering: With awk, you can filter lines based on conditions, for instance, 'awk '$2>100' my.txt' will display lines where the second field exceeds 100, helping in quickly identifying significant data points. 3. Counting and Summing: Aggregate data with ease. For example, 'awk '{s+=$2; c++} END {print s/c}' my.txt' calculates the average of the second field, while 'awk '{print NR, $0}' my.txt' adds line numbers for better readability. 4. Pattern Matching: Searching through text becomes simple with awk. Use 'awk '/error/' my.txt' to find all lines containing the word 'error', making it ideal for analyzing logs. 5. Data Transformation: Manipulate the output format using 'awk '{print toupper($2)}' my.txt' to convert specific fields to uppercase, enhancing data visibility. These examples illustrate the versatility of awk in handling diverse text processing tasks in Linux, making it an invaluable skill for anyone working in system administration or data analysis.

Related posts

Useful awk command examples
Awk is a powerhouse text tool — it can scan files or streams, match patterns, and run custom actions on the fly, making it perfect for quick data filtering, parsing, and one-line automation Here are useful awk command examples 😎👇 Find high-res pdf books with all my Linux infographics at https
Learn Linux with Dan

Learn Linux with Dan

4 likes

An infographic titled 'Linux curl Command Examples' provides a comprehensive list of curl commands. It covers HTTP GET operations with options like user-agent and custom headers, HTTP POST/PUT operations for data and file uploads, and various file download operations including resuming and rate-limiting. Created by Dan Nanni.
Linux curl command examples
The curl command is a flexible tool that lets you send or receive data from servers using protocols like HTTP, HTTPS, FTP, and others, all from the command line Here are useful curl command examples 😎👆 #devops #opensource #software #TechTips Find high-res pdf books with all my #lin
Learn Linux with Dan

Learn Linux with Dan

7 likes

An infographic titled 'Linux netcat Command Examples' lists various `nc` commands for network tasks like port scanning, file transfer, creating shells, and streaming. It includes commands for TCP/UDP, IPv6, and persistent listeners, credited to Dan Nanni.
Useful netcat command examples
Netcat is the Swiss army knife of networking. It lets you read and write data over TCP or UDP, and infosec folks use it all the time for things like quick port scans, grabbing service banners, or setting up reverse shells. Here are useful netstat command examples 😎👆 Find high-res pdf ebooks w
Learn Linux with Dan

Learn Linux with Dan

7 likes

An infographic titled 'Linux cp Command Examples' presents a comprehensive list of `cp` command variations and their uses, including copying files, directories, preserving attributes, handling symbolic links, and using `find` and `rsync` for advanced copying tasks. The content is created by Dan Nanni.
Linux cp command examples
Many of you probably learned the cp command early on in Linux, but if you haven’t explored its full set of options and are too lazy to read its man page, you might be missing out on its true power Let’s review some useful examples of the command 😎👆 #softwareengineer #softwaredeveloper #sof
Learn Linux with Dan

Learn Linux with Dan

8 likes

Linux netcat command examples
The netcat command lets you read from and write to network connections using TCP or UDP. Its flexibility makes it a must-have for infosec professionals, who use it for tasks such as port scanning, banner grabbing, and setting up reverse shells during penetration tests. Here are useful netstat co
Learn Linux with Dan

Learn Linux with Dan

10 likes

A black background image titled "Linux scp Command Examples" lists various scp commands with their functions, including copying files/directories, using custom SSH ports, compression, private keys, rate-limiting, and jump servers. It also features a small circular image with "Created by Dan Nanni study-notes.org".
Scp command examples
The scp command lets you securely copy files between hosts over an SSH connection. Some of you might think scp is deprecated but in fact what’s deprecated is the scp protocol, not the command itself. The command now uses a more secure sftp protocol by default Here are some of useful scp com
Learn Linux with Dan

Learn Linux with Dan

7 likes

Useful sysdig command examples
Sysdig is one of those hidden gem tools that shows exactly what your Linux system is doing in real time — system calls, containers, network traffic, file access — everything, no guessing. Here are useful sysdig command examples 😎👆 Find high-res pdf ebooks with all my cybersecurity related inf
Learn Linux with Dan

Learn Linux with Dan

5 likes

Linux lsof command examples
If I had to pick a personal favorite among lesser-known Linux commands, it would be lsof. It’s my go-to tool for discovering which files are open and which processes are using them. Since everything in Linux is treated as a file, lsof proves to be surprisingly powerful and endlessly useful Here
Learn Linux with Dan

Learn Linux with Dan

3 likes

This image displays a comprehensive list of Tcpdump command examples for network traffic analysis on Linux. It covers various functionalities like capturing, filtering by interface, protocol, IP, port, and subnet, saving to files, displaying detailed packet information, and advanced filtering using TCP flags and VLANs.
Tcpdump command examples
Tcpdump is a powerful command-line tool for capturing and analyzing network traffic on Linux. This tool is essential for cybersecurity pros and sysadmins to troubleshoot issues, inspect protocols, and detect suspicious activity Here are useful tcpdump command examples 😎👆 #technology #softwar
Learn Linux with Dan

Learn Linux with Dan

7 likes

A Linux watch command cheatsheet created by Dan Nanni, listing various commands to monitor system metrics in real-time. Examples include tracking CPU/memory usage, disk space, log file growth, network activity, and system errors, with refresh intervals specified.
Linux watch command cheatsheet
Ever wish you could just run a command and keep seeing it update automatically as things change? That is exactly what the watch command does on Linux Here are useful examples of the watch command 😎👆 Find high-res pdf ebooks with all my Linux related infographics at https://study-notes.org
Learn Linux with Dan

Learn Linux with Dan

5 likes

A Linux I/O Redirection cheat sheet created by Dan Nanni, detailing various shell commands for redirecting, appending, and combining standard input, output, and error streams. It includes examples like `cmd < file`, `cmd > file`, `cmd 2> file`, `cmd > file 2>&1`, and `cmd <<< "string"` with their corresponding descriptions.
Linux I/O redirection cheat sheet
Here is a concise reference of Linux shell operators for redirecting, appending, and combining standard input, output, and error streams 😎👇 Find high-res pdf ebooks with all my Linux related infographics at https://study-notes.org #linux #sysadmin #infosec #devops #softwareengine
Learn Linux with Dan

Learn Linux with Dan

6 likes

An infographic titled 'Linux Tuned Command Essentials' explains the tuned service for optimizing performance or power. It lists essential `tuned-adm` command examples like `list`, `active`, `recommend`, `profile`, and `off`. A table details various tuning profiles such as balanced, powersave, and throughput-performance, along with their descriptions.
Linux tuned command examples
The tuned command is a system tuning tool available in Linux. It dynamically optimizes performance or power consumption by applying predefined or custom tuning profiles Here are basic tuned command examples and built-in tuned profiles you can readily use 😎👆 #software #computer #software
Learn Linux with Dan

Learn Linux with Dan

9 likes

Google Sheets keyboard shortcuts
Google Sheets is a cloud based spreadsheet tool for organizing, analyzing, and sharing data online. Keyboard shortcuts make work faster and more efficient, esp when you are working with large datasets or performing frequent edits Here are useful keyboard shortcuts for Google Sheets 😎👆 Find
Learn Linux with Dan

Learn Linux with Dan

698 likes

I’m Linuxvr!
#gettoknowme #gorillatag #fyp #newcontentcreator #linux
🧑‍💻🐧Linuxvr_Offical🐧🧑‍💻

🧑‍💻🐧Linuxvr_Offical🐧🧑‍💻

1 like

Linux command chaining
Linux shells like bash and zsh make it easy to combine commands using chaining, command substitution, and process substitution, letting you run tasks in sequence, reuse command output, or connect commands more flexibly 😎👆 Find a high-res pdf ebook with all my Linux related infographics from http
Learn Linux with Dan

Learn Linux with Dan

2 likes

An infographic titled "Linux strace Command Examples" defines strace as a Linux diagnostic tool. It lists various strace commands for tracing system calls, logging output, attaching to processes, filtering by syscalls, monitoring child processes, displaying timestamps, and generating syscall summaries. It is created by Dan Nanni.
Linux strace command examples
strace is a Linux diagnostic tool that traces system calls and signals made by a process to help debug and analyze its interaction with the kernel Here are useful strace command examples 😎👇 #cybersecurity #infosec #software #technology Find a high-res pdf book with all my #linux re
Learn Linux with Dan

Learn Linux with Dan

4 likes

These 5 websites feel illegal to know!
#gettoknowme
Useful AI Websites & Tutorials

Useful AI Websites & Tutorials

38 likes

Linux command chaining
POSIX-compliant Linux shells (bash, zsh, sh) support command chaining — a simple way to link multiple commands and control whether the next one runs based on success, failure, or just order of execution 😎👆 Find a high-res pdf book with all my Linux related infographics from https://study-notes.o
Learn Linux with Dan

Learn Linux with Dan

6 likes

An infographic titled 'Linux ip Command Examples' provides a quick reference for various `ip` subcommands. It details commands for managing IP addresses (`ip addr`), network interfaces (`ip link`), network routes (`ip route`), ARP neighbors (`ip neigh`), and tunnels (`ip tunnel`), including IPv6 options.
Linux ip command examples
The ip command in Linux is a powerful tool used to configure and manage network interfaces, routing tables, and network policies. It serves as a modern replacement for older commands such as ifconfig and route Here are useful ip command examples 😎👆 #technology #networking #cybersecurity
Learn Linux with Dan

Learn Linux with Dan

3 likes

An infographic titled 'Sysdig Command Examples' defines Sysdig as a Linux tracing tool and lists various commands for monitoring CPU, memory, network, file I/O, and capturing events. It's created by Dan Nanni.
Useful sysdig command examples
The sysdig command is a powerful system-level exploration and troubleshooting tool for Linux. Sysdig can capture and analyze real-time system calls and events, enabling deep visibility into processes, containers, network activity, and file access Here are useful sysdig command examples 😎👆 #te
Learn Linux with Dan

Learn Linux with Dan

26 likes

An infographic titled 'Linux lsof Command Examples' by Dan Nanni, detailing various uses of the lsof command. It categorizes examples for listing open files, network connections and sockets, and other usages like Unix domain sockets and killing user activities.
Linux lsof command examples
My underrated Linux pick is the lsof command. It tells you exactly which files are open and which processes are using them. Because Linux treats everything as a file, this tiny command ends up being insanely powerful and useful in everyday troubleshooting. Here are useful lsof command examples 😎
Learn Linux with Dan

Learn Linux with Dan

2 likes

This image displays "Useful Linux Cron Examples," a comprehensive list of cron job schedules. It shows various cron expressions with corresponding commands and descriptions for tasks like running every minute, hourly, daily, weekly, monthly, yearly, at system startup, and more, created by Dan Nanni.
Useful Linux cron examples
Linux cron schedules recurring tasks at defined times using flexible expressions for minutes, hours, days, and months Here are useful cron job examples 😎👇 #software #softwaredeveloper #TechTips #technicalinterview Find a high-res pdf book with all my #linux related infographics fro
Learn Linux with Dan

Learn Linux with Dan

7 likes

Linux journalctl command examples
The journalctl command lets you view and manage logs collected by systemd’s centralized logging system across the whole machine Here are useful journalctl command examples 😎👇 #sysadmin #technology #software Find high-res pdf books with all my #Linux related infographics at https://st
Learn Linux with Dan

Learn Linux with Dan

5 likes

Powerful Websites
#freewebsite #website #fromsoftware #fyplemon8 #fyp
Tha Smoke Websites

Tha Smoke Websites

762 likes

This image displays a comprehensive list of useful Wireshark filter examples. It includes filters for IP addresses, ports, protocols like TCP, UDP, HTTP, DNS, TLS, DHCP, and packet properties such as length and content. The infographic was created by Dan Nanni from study-notes.org.
Useful Wireshark filter examples
Wireshark filters cut through the noise so you can focus on the traffic that matters: protocols, IPs, ports, or even packet contents. For blue teams, they help track suspicious activity and investigate forensic evidence. For red teams, they help map behavior, spot weak points, and test defenses
Learn Linux with Dan

Learn Linux with Dan

2 likes

Linux nmcli command examples
nmcli is a CLI tool that talks to NetworkManager—lets you create and manage connections, check status, and run basic network diagnostics right from the terminal Here are useful nmcli command examples 😎👆 Find high-res pdf ebooks with all my Linux related infographics at https://study-notes.org
Learn Linux with Dan

Learn Linux with Dan

3 likes

A Linux Cheatsheet for Engineers from @thealpha.dev, listing various commands categorized into File System Operations, File Permissions, Process Management, Networking, System Information, Package Management, Shell Scripting, User and Group Management, File Transfer, and System Services. A penguin on a skateboard is at the bottom.
Linux cheat sheet✨️
Where are my tech babes at?👩🏿‍💻 This is something I'm learning in school😍 It's been super fun typing things into the command line and actually getting a response🥹💕💕💕 One of my classmates shared this cheat sheet to make using Linux easier #imdoingsomethingright #CybersecurityAwarenessMon
Deya!

Deya!

27 likes

DebianLinux

DebianLinux

4 likes

An infographic titled "Linux pv Command Examples" illustrates various uses of the `pv` command. It shows how to monitor file copying, merging, compression, decompression, SCP transfers, disk partition backups/restores, limit transfer speeds, and manage tarball creation/extraction with progress visualization.
Linux pv command examples
The pv command is a handy but lesser-known tool that lets you monitor the progress of data through a pipe, displaying transfer speed, ETA, and total size. It’s often used with commands like tar, dd, or gzip to track the progress of file transfers, backups, or compression tasks Here are useful Li
Learn Linux with Dan

Learn Linux with Dan

3 likes

An infographic titled 'Linux socat Command Examples' presents 14 practical `socat` commands for various networking tasks, including TCP, UDP, SSL/TLS, UNIX sockets, and file operations. It was created by Dan Nanni from study-notes.org.
Linux socat command examples
Ever heard of socat? It’s one of those Linux tools that quietly does everything. You can use it to pipe data between almost any two things: TCP, UDP, SSL/TLS, UNIX sockets, files, even serial ports. Pentesters love it for reverse shells, port forwarding, and quick network tests. Here are useful
Learn Linux with Dan

Learn Linux with Dan

5 likes

Crown CarPlay effect
Crown CarPlay effect #appel car play #carplay #toyota #linux #androidauto
QUN MO

QUN MO

1 like

These sites saved my brain in 2025 🧠💻
1. ChatHub I used to bounce between AI platforms, copy-pasting the same prompt over and over to compare answers. With ChatHub, I can talk to multiple AIs at the same time, in one clean interface. It’s honestly my go-to whenever I’m brainstorming content, writing study scripts, or just curious whi
emilie.studygram

emilie.studygram

561 likes

An infographic titled 'Useful TUI Linux Software' with a Tux penguin logo. It defines TUI as Text-based User Interface for terminal environments and lists various software categorized under Disk Manager, System Monitor, Web Browser, Network Manager/Monitor, Multimedia, GPT, Git, Coding, File Manager, and Messaging.
Useful TUI software on Linux
Linux TUI (Text User Interface) software offers a user-friendly way to interact with applications directly from the terminal, using text-based menus and interfaces instead of a graphical desktop environment Here are a categorized list of useful TUI software available on Linux 😎👆 #software #o
Learn Linux with Dan

Learn Linux with Dan

4 likes

This image displays a table titled 'Deprecated Linux Command Usage' by Dan Nanni. It compares various deprecated Linux commands like ifconfig, netstat, fdisk, route, and arp with their modern, up-to-date alternatives such as ip and ss, providing a description for each command's function.
Deprecated Linux command examples
Just like anything else, even widely used Linux tools can become outdated as better and more efficient options emerge. Once deprecated, these tools typically stop receiving new features or security updates, even if they’re still accessible. While it can be tough to move on from familiar habits,
Learn Linux with Dan

Learn Linux with Dan

8 likes

linux distro linux ricing :)
Linux Ricing #linux #computer
☬hyprland✇

☬hyprland✇

6 likes

A person with long dark hair and a straw hat walks through a sunny public square. Overlay text reads "CYBERSECURITY CAREER Tips to get started," introducing advice for a career in cybersecurity.
A person in a white dress walks on a path next to green bushes. Overlay text advises to "Build a Strong Technical Foundation" by learning networking basics, operating systems, and scripting languages.
People walk across a street with benches and trees in the background. Overlay text suggests to "Get Hands-On Experience" through CTF competitions, cybersecurity challenges, and setting up a home lab.
Tips for pursuing a career in cybersecurity
1. Build a Strong Technical Foundation A solid understanding of systems, networks, and programming is essential for identifying and mitigating security threats. • Learn networking basics (e.g., TCP/IP, firewalls, VPNs). • Gain familiarity with operating systems (Windows, Linux)
vedha | career tips (tech) 👩‍

vedha | career tips (tech) 👩‍

137 likes

An infographic titled "Linux Command Chaining" explains various command chaining methods. It covers sequential chaining, conditional execution for success (&&) and failure (||), combined success/failure conditions, pipelines (|), and redirection (>, >>), each with a command example. The graphic is created by Dan Nanni from study-notes.org.
Linux command chaining
POSIX-compliant Linux shells like bash, zsh and sh provide a feature called “command chaining”, which lets you connect multiple commands using specific operators to control their execution based on success, failure or sequence 😎👆 #software Find high-res pdf books with all my #linux infogra
Learn Linux with Dan

Learn Linux with Dan

3 likes

An infographic titled 'Understanding Linux Signals' illustrates signal sources like kernel-detected faults, system calls, and kernel subsystems. It shows how processes handle signals through default actions, custom handlers, or ignoring them. A table details common signals, their numbers, default actions, and triggering conditions.
Understanding Linux signals
“Signals” provide a lightweight mechanism for the Linux kernel and other processes to asynchronously notify a running process about events such as faults, user interrupts, or system conditions 😎👆 Find high-res pdf ebooks with all my Linux related infographics at https://study-notes.org #linu
Learn Linux with Dan

Learn Linux with Dan

8 likes

An infographic titled 'Linux nmcli Command Examples' detailing commands for viewing network configuration, managing network devices, managing WiFi networks, and managing other connection types like Ethernet. It includes commands for status, connection, device control, WiFi setup, and IP configuration.
Linux nmcli command examples
nmcli is a Linux command-line utility that interacts with NetworkManager, enabling users to create, modify, and manage network connections, check connection status, and perform basic network diagnostics directly from the terminal Here are useful nmcli command examples 😎👆 #software #devops #T
Learn Linux with Dan

Learn Linux with Dan

4 likes

Recover Deleted Files Using Terminal Commands
Accidentally wiped important files on Windows/macOS/Linux? This video shows how to use terminal and command-line recovery methods to restore deleted data before it gets permanently overwritten. #cmdanks #datarecovery #windows11 #linux #TechTips
XanthusTechCore

XanthusTechCore

5 likes

An infographic titled 'OpenSSH Command Examples' by Dan Nanni, listing twelve practical OpenSSH commands for secure remote logins, file transfers, and command execution, including custom port connections, key authentication, preventing timeouts, running remote commands, port forwarding, jump servers, copying public keys, custom config files, SOCKS proxies, and connection multiplexing.
OpenSSH command examples
OpenSSH is a versatile suite of client and server tools that use the SSH protocol to provide encrypted and authenticated communication over networks. This toolset is heavily used for secure remote logins, file transfers, and command execution in various cloud and on-premises environments Here ar
Learn Linux with Dan

Learn Linux with Dan

6 likes

A computer monitor displays a Linux Mint desktop with its distinctive logo. The screen shows numerous folders labeled with names of classic gaming systems such as Sega Genesis, Atari 2600, Gameboy, Super Nintendo, MAME Roms, Neo Geo CD, Nintendo 64, Nintendo DS, PS2, and PS3.
Linux Mint User
I don't have windows installed on my computer at all. I use Linux Mint and I absolutely love it! #linux #computer #Lemon8Diary
Robert Ramos

Robert Ramos

11 likes

Linux grep command examples
The grep command — my all-time favorite in Linux — is like a spotlight for text. It instantly finds words, phrases, or patterns inside files or streams with precision and speed Here is a quick grep cheatsheet to power up your searches 😎👆 #softwareengineer #TechTips #linux Find high-res
Learn Linux with Dan

Learn Linux with Dan

2 likes

Linux socat command examples
The socat command is an extremely versatile Linux utility for bidirectional data transfer between two endpoints. It supports many protocols like TCP, UDP, TLS, and interfaces like UNIX sockets, files, pipes, and serial ports. Socat is commonly used by pentesters for tasks like creating reverse shel
Learn Linux with Dan

Learn Linux with Dan

2 likes

DebianLinux

DebianLinux

2 likes

A ranked list of the top 20 Linux-related GitHub projects, including their repository names, star counts, fork counts, and brief descriptions. Projects range from the Linux kernel to command-line tools, editors, and system monitors. The infographic is credited to Dan Nanni and study-notes.org.
Top Linux-related GitHub projects
As a Linux fan, I’m always curious which open-source Linux projects are getting the most attention on GitHub Here are some of the big ones 😎👆 Did I miss anything important? Find high-res pdf ebooks with all my Linux related infographics at https://study-notes.org #linux #github #op
Learn Linux with Dan

Learn Linux with Dan

4 likes

An infographic titled 'Linux ufw Firewall Command' details ufw, a user-friendly frontend for iptables. It categorizes commands for rule inspection, addition (allow/deny/limit), removal, and managing app profiles. Examples include 'ufw status', 'ufw deny ssh', and 'ufw reset', with creator Dan Nanni and study-notes.org credited.
Linux ufw firewall command examples
Ufw (“Uncomplicated Firewall”) is the user-friendly frontend for iptables, which is commonly used as a host-based firewall on Debian-based Linux Here are useful ufw command examples 😎👆 #cybersecurity #TechTips #infosec #upskill Find high-res pdf books with all my #linux related in
Learn Linux with Dan

Learn Linux with Dan

2 likes

Old bank notes
I collect also bank notes
DebianLinux

DebianLinux

8 likes

An infographic titled 'Ways to Remove Files on Linux' presents a comprehensive list of commands for deleting files and directories. It includes various `rm` commands for basic removal, `find` commands for conditional deletion based on criteria like age, size, user, or permissions, and other utilities like `unlink`, `shred`, and `trash-put`. The infographic is created by Dan Nanni from study-notes.org.
Different ways to remove files on Linux
There are various ways to remove files and directories on Linux, based on filenames, creation/access time, size, ownership, permissions, or security needs Here are useful command line examples of removing files on Linux 😎👆 #infosec #TechTips #software Find high-res pdf books with a
Learn Linux with Dan

Learn Linux with Dan

10 likes

Fujitsu Alphard upgraded with CarPlay, unbeatable
Fujitsu Alphard upgraded with CarPlay, unbeatable sound quality #carplay #toyota #lexyus #linux #carplayinterface Ourisman Chantilly Toyota
CAR TEC

CAR TEC

1 like

A computer screen displays the Linux Mint logo, a stylized 'lm' in an oval, on a dark patterned background. Above it, 'LEM•N8 DIARY DAILY MOMENTS' is visible in pink and yellow text, indicating a Lemon8 post about the Linux Mint installation.
Linux mint
Just installed Linux mint for my parents. Let’s gooooo Florida #linux #fypシ #letsgo #tech #lemom8diary
Harry

Harry

1 like

DebianLinux

DebianLinux

87 likes

Linux terminal shortcuts
Level up your Linux skills! Terminal shortcuts make command-line work faster, from navigation to file management and quick command execution. Master them to work like a true power user Here is a summary of useful Linux terminal shortcuts 😎👆 #TechTips #softwaredeveloper #productivitytips
Learn Linux with Dan

Learn Linux with Dan

4 likes

Ça c'est les pieds d'un français 🇫🇷 #lemon8 #lemon8fr #tiktok #tiktokfr
pierrebg2004

pierrebg2004

4 likes

See more