Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

UNIX Command Cheat Sheet for File Manipulation, Directory Navigation, and Text Editing, Cheat Sheet of Operating Systems

This unix command cheat sheet provides a comprehensive list of essential unix commands for file manipulation, directory navigation, and text editing. Learn how to list directories, change directories, create and remove directories, move and copy files, view files, and manage permissions. Also, discover important symbols and common text editors.

What you will learn

  • How do you change directories in UNIX?
  • What is the command to list the contents of a directory?
  • How do you create a new directory in UNIX?
  • What command is used to remove a directory in UNIX?
  • What command is used to view the manual for other commands?

Typology: Cheat Sheet

2019/2020

Uploaded on 10/23/2020

ekasha
ekasha 🇺🇸

4.8

(22)

270 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UNIX Command Cheat Sheet
Physics 91 SI Handout 04
Alex Ji and Zahan Malkani
Command Description Examples and Options
Most Important Command!
man Manual for other commands. man cat
Navigating Directories
ls List the contents of the directory. ls -lart /afs/ir.stanford.edu
cd Change directory. cd WWW/
pwd Print working directory. pwd
Modifying Directories and Files
mkdir Make new directory. mkdir physics91SI
rmdir Remove directory. rmdir physics91SI
mv Move files. mv -i foo.txt foo2.txt
cp Copy files. cp -i ../foo.txt .
rm Remove files. (Cannot undo!) rm -i foo.txt
Viewing Files in Terminal
less View files easily. less foo.txt
cat Concatenate files. cat foo1.txt foo2.txt
Important Symbols
*Wild card, any number of charac-
ters.
ls *.txt
?Wild card, 0 or 1 characters. ls foo?.txt
.Current directory. cd .
.. Directory one level up. cd ..
&Run process in background. emacs &
|Pipe/filter output through another
program.
cat foo.txt | less
>Redirect standard output to. cat foo.txt >foo2.txt
<Redirect standard input from. less <foo.txt
Common text editors: emacs,vim,vi,pico,nano
pf2

Partial preview of the text

Download UNIX Command Cheat Sheet for File Manipulation, Directory Navigation, and Text Editing and more Cheat Sheet Operating Systems in PDF only on Docsity!

UNIX Command Cheat Sheet

Physics 91 SI Handout 04 Alex Ji and Zahan Malkani Command Description Examples and Options Most Important Command! man Manual for other commands. man cat Navigating Directories ls List the contents of the directory. ls -lart /afs/ir.stanford.edu cd Change directory. cd WWW/ pwd Print working directory. pwd Modifying Directories and Files mkdir Make new directory. mkdir physics91SI rmdir Remove directory. rmdir physics91SI mv Move files. mv -i foo.txt foo2.txt cp Copy files. cp -i ../foo.txt. rm Remove files. (Cannot undo!) rm -i foo.txt Viewing Files in Terminal less View files easily. less foo.txt cat Concatenate files. cat foo1.txt foo2.txt Important Symbols

  • Wild card, any number of charac- ters.

ls *.txt ? Wild card, 0 or 1 characters. ls foo?.txt

. Current directory. cd. .. Directory one level up. cd .. & Run process in background. emacs & | Pipe/filter output through another program.

cat foo.txt | less

Redirect standard output to. cat foo.txt > foo2.txt < Redirect standard input from. less < foo.txt Common text editors: emacs, vim, vi, pico, nano

Command Description Examples and Options File Manipulation (Fill out yourself ) wc sort head tail split cut paste uniq pr Permissions (Fill out yourself ) chmod

Job Manipulation (Fill out yourself ) ps kill jobs fg bg Ctrl-z Ctrl-c Searching (Fill out yourself ) grep

find

Miscellaneous (Fill out yourself ) touch who whoami du diff