Here are some advanced terminal commands commonly used in Linux:
-
grep: Searches for a specific pattern in files.grep "search_term" filename -
find: Searches for files and directories in a directory hierarchy.find /path/to/search -name "filename" -
du: Displays disk usage of files and directories.du -h /path/to/directory -
sort: Sorts lines of text files.sort filename -
awk: A powerful text processing tool for pattern scanning and processing.awk '{print $1}' filename -
sed: A stream editor for filtering and transforming text.sed 's/old_text/new_text/g' filename -
kill: Sends a signal to terminate a process.kill process_id -
killall: Kills processes by name.killall process_name -
pkill: Kills processes based on name and other attributes.pkill -f "process_name" -
tar: Archives files and directories.tar -cvf archive_name.tar /path/to/directory
These commands allow for more complex operations and management of files, processes, and system resources in a Linux environment.
