Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Common UNIX Commands and Utilities: Practical Reference for DevOps and Sysadmin Work

UNIX command-line literacy is foundational for DevOps and operations work, from inspecting logs and managing files to troubleshooting processes and automating recurring tasks. This revised guide turns the original command list into a practical reference you can use during daily terminal work.

Originally published on 2011-01-05; fully revised and updated.

unix commands and utilities

Find commands quickly with built-in documentation

When you do not remember the exact command name, use man -k with a keyword. Then open the manual page for the command you want. GNU tools may also include additional info documentation.

man -k tape
man tar
man csh
info ls
history | tail -20

A safe workflow for using unfamiliar commands

flowchart TD
    A[Need a command] --> B[Search with man -k keyword]
    B --> C[Read man or info page]
    C --> D[Run on test file or test path]
    D --> E{Output expected}
    E -- no --> F[Refine options and retry]
    F --> C
    E -- yes --> G[Automate with script cron or alias]
    G --> H[Use in production task]

UNIX command groups at a glance

Task areaCommands from the original guideTypical use
Login and authenticationlogin, logout, passwd, kinit, kdestroySession access and credential handling
System informationdate, history, man, info, who, whoami, top, uptimeHost state and user context
Files and directoriesls, cp, mv, rm, ln, chmod, find, cd, mkdir, rmdir, pwdEveryday file lifecycle tasks
File display and comparisoncat, more, head, tail, grep, diff, cmp, comm, wc, file, strings, odInspect, search, and compare data
Disk and archivesdf, du, gzip, gunzip, tar, ddCapacity checks, compression, archiving
Execution controljobs, ps, kill, nice, at, crontab, fg, bg, alias, limitForeground/background jobs and scheduling
Networkingssh, scp, sftp, host, lynx, telnet, ftpRemote access and transfers
Text and data processingsed, awk, perl, sort, tr, cut, paste, fmt, foldStream editing and structured text handling
Editors and build toolsvi, emacs, xemacs, pico, gcc, g++, make, dbx, cflowEditing, compiling, and builds
Printing and document toolinglpr, lpq, lprm, enscript, tex, latex, dvips, xdviPrint queues and document workflows

For password changes with passwd, follow strong password guidance (original external reference): strong password practices.

C-shell control keys, symbols, and job control

The original article is C-shell oriented in several sections. If you use Bash or Zsh, behavior and key bindings may differ. Also see the linked reference for shell-special filename characters: special characters to avoid in filenames.

Terminal control characters (C-shell)

KeyEffect
Ctrl+H (or Backspace)Erase previous character
Ctrl+UErase current input line
Ctrl+DEnd input for terminal-reading programs
Ctrl+SPause terminal output
Ctrl+QResume terminal output
Ctrl+ZSuspend current foreground job
Ctrl+CInterrupt current foreground program
Ctrl+\Forceful quit of current foreground program

Special symbols and I/O operators

Symbol or commandMeaning
*Wildcard for filename matching
~userUser home-directory shorthand
$nameVariable substitution
\Escape next special character
‘…’Single-quote literal string
“…”Double-quote string with variable expansion
`…`Command substitution (legacy syntax)
|Pipe stdout to next command
>Redirect stdout to file
<Read stdin from file
>>Append stdout to file
jobs, fg, bg, killJob listing, resume, background, terminate
sleep 300 &
jobs
fg %1
grep 'ERROR' app.log | tee errors.log
sort app.log > sorted.log
wc -l < sorted.log
./rotate-logs.sh >> ops.log 2>&1Code language: HTML, XML (xml)

File, directory, and disk operations

CommandPrimary useExample
lsList files and metadatals -al
cpCopy filescp source.txt backup.txt
mvMove or renamemv old.log archive.log
rmDelete filesrm -i old.log
lnCreate additional link nameln app.log latest.log
chmodChange permissionschmod 640 secrets.txt
findSearch by criteriafind . -name ‘*.conf’ -type f
df / duFilesystem free space and usagedf -h ; du -sh ./data
gzip / gunzipCompress and decompressgzip logs.txt
tarArchive directories/filestar -czf release.tgz ./release
pwd
ls -al
mkdir -p archive/2026
cp app.log archive/2026/
mv archive/2026/app.log archive/2026/app.log.1
find archive -name '*.log*' -type f
du -sh archive
df -hCode language: JavaScript (javascript)

Display, compare, and inspect file contents

CommandBest forNotes
catQuick file outputGood for short files and pipelines
morePaged terminal viewingUseful on long text output
head / tailStart or end of filesCommon for log triage
grepPattern matchingFilter lines by regex/text
diffLine-level text differencesUseful for config comparisons
cmpBinary-level comparisonReports whether files differ
commCommon/unique linesCompares sorted text files
wcCounts lines/words/charsQuick volume checks
fileGuess file typeHelpful before parsing unknown files
strings / odInspect binary contentExtract printable text or octal/hex views
head -n 20 /var/log/syslog
tail -n 50 /var/log/syslog
grep -n 'ERROR' app.log
diff -u old.conf new.conf
wc -l app.log
file /bin/ls
strings /bin/ls | headCode language: JavaScript (javascript)

Networking and remote transfer commands

CommandSecurity profileTypical use
sshEncryptedRemote shell and command execution
scpEncryptedNon-interactive file copy
sftpEncryptedInteractive file transfer session
telnetPlaintext credentialsLegacy remote login; generally not recommended
ftpPlaintext credentialsLegacy transfer method; generally not recommended
hostN/ADNS lookup for host/IP mapping
lynxN/AText-mode web browsing
ssh devops@example-host
scp release.tgz devops@example-host:/tmp/
sftp devops@example-host
host example.comCode language: CSS (css)

Text processing, editors, and programming tools

AreaCommandsUse case
Stream editingsedBatch substitutions and line transforms
Pattern processingawkColumn-aware text processing
General scriptingperlPowerful text and report extraction
Column utilitiescut, paste, tr, sortReshape delimiter-based data
Editorsvi, emacs, xemacs, picoInteractive file editing in terminal/X
Compilers and buildsgcc, g++, make, dbx, cflowCompile, debug, and rebuild source code
Shell interpreterssh, csh, kshRun shell scripts in matching shell syntax
cut -d',' -f1 users.csv | sort
awk '{print $1, $3}' metrics.txt
sed 's/ERROR/WARN/g' app.log > app.log.rewritten
gcc -o hello hello.c
makeCode language: JavaScript (javascript)

Legacy and environment-specific utilities from the original list

  • Kerberos commands: kinit, kdestroy
  • Email and bulletin tools: mailx, msgs, uuencode, uudecode, rn
  • X Window clients: xterm, xauth, xload, xman, xdvi, gv
  • TeX toolchain: tex, latex, dvips, latex2html
  • Tape/archive operations: mt, dd, tar, ltf
  • Scientific/programming libraries and tools listed: lapack, dbm, xdr, netcdf, f77, f2c

Best practices and common pitfalls

  • Use man (and man -k) before running unfamiliar commands on production paths.
  • Prefer ssh, scp, and sftp over plaintext protocols like telnet and ftp.
  • Be careful with destructive commands (rm, mv, dd); test on sample data first.
  • Verify which shell you are in; C-shell behavior can differ significantly from Bash/Zsh.
  • Use redirection and logging deliberately so command output is auditable (>>, tee, 2>&1).
  • Expect command availability to vary across UNIX/Linux environments, especially for legacy tools.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Linux System Administrator Responsibilities: Daily Operations, Privileges, and Best Practices

Linux system administrators are responsible for server reliability, security, access control, patching, backups, and troubleshooting. This updated guide maps those responsibilities to practical workflows and command examples.

Read More

UNIX sed Quick Reference: Print and Delete Lines with Address and Pattern Ranges

Use this sed quick reference to print or delete exact lines, ranges, and regex matches without opening an editor. It also highlights GNU vs POSIX differences and safer in-place editing patterns.

Read More

Install Subversion (SVN) on Linux: Package Install, Source Build, Apache Setup, and Authentication

Learn how to install Subversion on Linux, create a repository, and publish it through Apache with user authentication. This revised guide includes both package-based and legacy source-build paths with practical commands.

Read More

Unix grep Quick Reference: Patterns, Options, and Real Command Examples

grep is the core Unix command for searching text by pattern across files or standard input. This revised quick reference covers syntax, high-value options, and practical examples you can use immediately.

Read More

Apache Ant: Set the Current User Home Directory with env.HOME (and Safe Fallbacks)

Learn how to read the logged-in user’s home directory in Ant using env.HOME, then make it portable with a user.home fallback. Includes build.xml patterns you can use in local builds and CI.

Read More

Unix Basics for DevOps Engineers: Commands, Permissions, Pipes, and Workflow

This revised guide turns a legacy Unix slide embed into a practical reference for beginners and DevOps engineers. Learn core Unix concepts, essential commands, and command execution flow with hands-on examples.

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x