Skip to content

A CLI tool to search and learn about Linux commands and Args with example.

Notifications You must be signed in to change notification settings

harshavardhanSDE/linux-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

linux-tools

A comprehensive list of Linux CLI tools, with examples.

grep : Searching text within files, for example finding a specific string in a log file.
awk : Text processing and data extraction from files.
sed : stream editing for transforming text in a pipeline.
curl : Transferring data from or to a server, often used for making HTTP requests.
wget : Non-interactive network downloader, useful for retreiving files from the web.
ssh : Securely connecting to remote servers.
scp : Securely copying files between hosts on a network
rsync : Synchronizing files and directories between two locations.
tar : Archiving files into a single file and extracting files from an archive.
gzip : Compressing files.
top/htop : Displaying real-time system processes and resouce usage.
ps : Displaying information about active processes.
df : Displaying disk space usage.
du : Estimating file space usage.
netstat/ss: Network statistics, useful for monitoring network connections and routing tables.
ping : Checking the connectivity between the local host and remote network host.
traceroute : Tracing the route packets take to reach a network host.
ip : Displaying and manipulating routing, network devices, interfaces, and tunnels.
iptables : Setting up, maintaining, and inspecting the tables of IP packet filter rules in the linux kernel
cron : Scheduling automated tasks to run at specified intervals.
systemcl : Managing system services.

grep

The grep command in linux is a powerful tool used for searching text using patterns. It has many options that can be combines to perform complex text searches.

examples:

Basic usage:

grep PATTERN FILE

Options

-i : Ignores case distinctions.
grep -i "pattern" pattern.txt

-v: Invert match, showing lines that do not match the pattern.
grep -v "pattern" pattern.txt

-c: Count the number of matching lines.
grep -c "pattern" pattern.txt"

-l: List file names with matches.
grep -l "pattern" *.txt

-L: List file names with the matchs.
grep -L "pattern" *.txt

-n: Show line numbers with output.
grep -n "pattern" pattern.txt

-r / -R: Recursively search directories.
grep -r "pattern" ~/patterns

-w: Match whole words
grep -w "pattern" pattern.txt

-x: Match whole line.
grep -x "pattern" pattern.txt

-o: Show only matched parts of a line.
grep -o "pattern" pattern.txt

-q: Quiet mode ( no output, exit status indicates match) grep -q "pattern" pattern.txt

About

A CLI tool to search and learn about Linux commands and Args with example.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages