This directory introduces basic Unix/Linux commands commonly used in
KornShell (ksh) scripting.
Try each command directly in the terminal to understand its behavior.
| Command | Description |
|---|---|
mv |
Move or rename a file or directory |
rm |
Remove file(s) |
rmdir |
Remove an empty directory |
cp |
Copy file(s) or directory(ies) |
mkdir |
Create a directory |
touch |
Create a file |
cd |
Change or navigate to a directory |
pwd |
Print current working directory path |
ls |
List directory contents |
echo |
Print text |
print |
KornShell / MKS Toolkit equivalent of echo |
printf |
Display formatted output |
sort |
Sort the contents of a file |
rev |
Reverse character order of input lines |
wc |
Display number of lines, words, and characters |
head |
Display the beginning of a file |
tail |
Display the end of a file |
date |
Print current date and time |
find |
Search for files within directories (e.g., NAS) |
grep |
Search for matching patterns in files |
tr |
Translate or delete characters |
cut |
Extract selected portions of each line |
cat |
Read, create, and concatenate files |
zip |
Compress files into .zip format |
sleep |
Delay execution for a specified time |
exit n |
Exit a shell or script (0-255, default is 0) |
expr |
Evaluate expressions (conditions or arithmetic) |
let |
Evaluate arithmetic expressions with precedence |
unset |
Remove shell variable(s) |
export |
Export variable(s) to child processes |
- Build strong command-line fundamentals
- Understand how commands behave in KornShell scripts
- Prepare for real-world shell automation and enterprise systems
💡 Tip: Practice each command with different flags and inputs.