Linux Commands and File System Navigation
4.1 Inter-User Communication — write and wall
4.1.1 write — Two-Way Channel to a Single User
Hook: Imagine you and a classmate are logged into the same Linux server in two different labs — no phone, no chat app — yet you can still open a private, live text channel directly inside the terminal. How?
Intuition and analogy: Think of write like passing a paper note through a single desk slot. Only one recipient's desk has that slot, and once you open it, paper flows both ways until one of you closes the slot. The analogy maps cleanly: the username is the desk label, your keystrokes are the paper, and Ctrl + D is closing the slot. Where the analogy breaks: unlike paper notes, write is live and interleaves with whatever the other user is doing — it can interrupt their screen, so you must coordinate turns with conventions like (o) for over and (oo) for over-and-out.
Formalize — what write is and how it works:
- Definition:
writeis a standard UNIX command that opens a two-way communication channel between two users who are currently logged in on the same system. It copies lines typed on one user's terminal to the other user's terminal and vice versa. - Syntax:
write username [ttyname] username— the login name of the target user as shown bywho. This is required. Example:write nicoorwrite ubuntu.ttyname— optional terminal line (e.g.,tty2,pts/0) shown in the second column ofwho. You need it only when the same user is logged in on multiple terminals and you want to pick one.- After you press Enter, the target sees
Message from you on ttyX ...and you seeMessage from username .... Now anything you type goes to their screen, anything they type comes to yours. - Session lifecycle:
- Initiator types
write maryand presses Enter. - Both sides type freely. Each line appears on the other side after Enter.
- Either side presses
Ctrl + D— the end-of-file character — which signals no more input. This returns that user to the shell prompt (\$). The other side seesEOFand then also pressesCtrl + DorDELETEto exit.DELETE/Ctrl-Ccan also interrupt, butCtrl + Dis the clean convention taught here.
- Permissions: The target's terminal must allow messages.
mesg nblocks writes;mesg yallows them. When blocked,writereportspermission deniedoruser has messages disabled.
Worked example — opening and closing a write session:
Setup: Two users, you (ttyA) and mary (tty7), both logged in as shown by who.
Steps on your terminal:
\$ who
mary tty7 Sep 25 19:03
you ttyA Sep 25 23:01
\$ write mary
did you forget lunch? (o)
What Mary sees:
Message from you on ttyA at 23:02 ...
did you forget lunch? (o)
Mary replies on her terminal (she already typed write you to answer):
ten minutes (o)
What you see:
ten minutes (o)
ok (oo)
Closing: You press Ctrl + D → you see \$ prompt and EOF on her side. She presses Ctrl + D → both back at \$.
Sense-check: After Ctrl + D, pwd and who work normally — you are back in the shell, not inside a subshell. If you forget (o) convention, lines still interleave but become unreadable, so discipline matters.
Scope and assumptions — when write applies:
- Assumption: Both users are logged into the same host and reachable via the same file system namespace.
writedoes not cross machines or networks by itself; for that you needmail,ssh, or network chat. - Scope: Works for plain text only, no file transfer, no history. The channel is ephemeral — nothing is saved unless you redirect.
- Breaks when: Target is not logged in (
write: user not logged in), target hasmesg n, or the system is single-user. Also, graphical desktop notifications may hide terminal messages.
Visual intuition: Picture two vertical terminal windows side by side, each with a prompt at the bottom. A horizontal arrow labeled write mary opens a pipe between them. Keystrokes flow as thin lines across the pipe; Ctrl + D is a valve that closes the pipe and the arrow disappears. The x-axis is time (before → during → after channel), the y-axis is who is typing. Landmarks: the Message from... banner at channel start, the (o) turn markers mid-stream, and the EOF/\$ at channel close. Takeaway: the channel is temporary and symmetric.
Pitfalls:
- Confusing
writewithwallormail:writeis one user,wallis all users,mailis asynchronous inbox. Pickingwallfor a private note broadcasts to everyone — noisy and impolite on a shared server. - Forgetting to handle
ttywhen user appears twice inwho: Ifmaryappears ontty7andtty8,write marymay pick the wrong one or fail withmary is logged in more than once; use tty. Always checkwho's second column first. - Not signaling turns: Without
(o)/(oo), both sides type at once and output garbles. The protocol is social, not enforced by the command. - Thinking
Ctrl + Cis the clean exit:Ctrl + Ckills the process butCtrl + D(EOF) is the documented clean end that the receiver sees as EOF. UseCtrl + D.
Recap + Bridge: write username opens a live, two-way terminal pipe to one logged-in user, closed with Ctrl + D and coordinated with who to find the target. This is the private half of inter-user talk; the next sub-section extends it to broadcast with wall and to discovery with who.
Real-world and domain connection: On multi-user servers, headless build machines, and early timesharing systems before Slack or Teams, write/wall were the sysadmin's coordination tools — a quick wall System going down in 5 minutes reaches every logged-in engineer without external dependencies. Today the same idea survives in tmux/screen messaging, DevOps jump hosts, and classroom lab servers where students share one machine. In systems programming, it illustrates the core UNIX idea that everything is a file — a terminal is just a writable file, and write is literally writing bytes to another user's terminal device file in /dev.
4.1.2 who and wall — Seeing Who Is Present and Broadcasting
Purpose: who answers "who is available to talk to?" and wall answers "how do I tell everyone at once?" Together they make write usable.
- Inputs and outputs:
who— no required argument. Output columns: login name, terminal line (tty7,pts/0), login time/date, and sometimes remote host. Example:who→mary tty7 Sep 25 19:03.who am i— shows only your own line, useful in a maze of terminals.wall— reads either from its arguments or from standard input and writes to every logged-in user's terminal. Typical forms:wallthen type message thenCtrl + D, orecho "reboot in 5" | wall, orwall message.txt.walloften requires privileges on modern systems; historically any user could broadcast.
Worked example — discover then broadcast:
\$ who
jib tty0 Sep 25 13:59
you tty2 Sep 25 23:01
mary tty7 Sep 25 19:03
\$ wall
System will reboot at 23:30 for maintenance. Please save work. (oo)
Ctrl-D
Broadcast Message from you@server (tty2) at 23:25 ...
System will reboot at 23:30 for maintenance. Please save work. (oo)
Steps: who reveals mary is on tty7. wall without arguments reads from keyboard until Ctrl + D, then the kernel delivers the same banner plus your text to every terminal including your own. Verifying: each user sees the same Broadcast Message ... header. The point Ctrl + D as EOF mirrors cat > file and sort — one convention reused everywhere.
Alternative single-line: echo "lab ends in 10" | wall achieves the same without interactive typing. Sense-check: if who shows zero others, wall still succeeds but only you see it — no error, just no audience.
Scope and assumptions:
whoscope: Shows only currently logged-in sessions on this host. It does not show users connected via web apps or other hosts.wallscope: Writes to every terminal whosemesgisy. Users withmesg ndo not receive it, and on many modern distros onlyrootmaywallto avoid spam.- Breaks when: You confuse
who(present users) withwhoami/id(your own identity) orusers(terse list). Each has different output shape.
Visual intuition: Imagine a server room with 6 terminals in a row; who lights up the 3 occupied seats (name tags above them, login time below). write draws one arrow from you to one lit seat; wall draws a fan of arrows from you to all lit seats simultaneously. Takeaway: discovery (who) must precede targeted talk (write), while wall skips targeting.
Pitfalls:
- Thinking
wallis private: Forgetting it hits everyone — including instructors — leads to accidental noise. Usewritefor one person. - Misreading
whocolumns: The second column is the tty name needed forwrite mary tty7disambiguation; ignoring it causes "logged in more than once" confusion. - Expecting
Qto quitwho:Qquitsmanandless, notwho.whoexits after printing; no pager involved.
Recap + Bridge: who discovers the audience, write talks to one, wall talks to all, all closed with the same Ctrl + D EOF idea. With communication covered, the lecture turns to the self-help tool that documents every other command: man.
Real-world: In production, who and wall (or its modern cousin shutdown -r +5 "message") coordinate maintenance windows on shared department servers and HPC clusters — a wall before reboot prevents lost lab work when dozens share one login node. The same pattern — enumerate presence then message — recurs in Slack's /who and Kubernetes kubectl get pods before kubectl exec.
4.2 Manual Pages — man and the GCC Example
4.2.1 man — The On-System Manual Pager
man stands for manual. For any command you want to understand in depth you rely on man. It shows the description, synopsis, and every option with its meaning. You navigate inside the pager and press Q to quit — Q indicates quit — and you return to the prompt.
4.2.2 GCC Manual as a Rich Example
A concrete illustration is man gcc. GCC is the GNU Compiler Collection, which compiles C and C++ files. Its manual page first gives a short description and then enumerates a long list of options and their significance. The point is that you do not need to search the internet for this detail. An offline Linux system already carries the same material that you would later find rendered as HTML online; the HTML is generated from these same man pages. When you are logged into a Linux machine the manual is immediately available. This also explains a note about write: it had no interesting options to illustrate, so the demonstration switches to gcc where many options make the manual page structure visible.
Worked example — man gcc as a rich manual page: Run man gcc and you see a short description of GCC — the GNU Compiler Collection that compiles C and C++ files — followed by a long enumerated list of options and their significance. The HTML you find online is generated from these same man pages, so an offline Linux machine already carries the material. Press Q to quit the pager and return to the prompt. Keywords: man gcc GCC GNU Compiler Collection compiles C and C++ description options significance HTML generated manual pages Q quit pager.
Purpose — man as on-system handbook: man opens the on-system manual pager for any command, showing description, synopsis, and every option. Navigation inside the pager and Q to quit are consistent patterns. Real-world: developers on air-gapped servers read GCC options offline via man, no internet needed.
Pitfalls: Confusing man write (few options) with man gcc (dozens) — the demo switches to gcc precisely because write had no interesting options to illustrate. Forgetting Q leaves you stuck in pager.
Recap + Bridge: man is the offline handbook and man gcc proves it with a rich option list. Next, where you stand in the filesystem matters: pwd and home placement.
4.4 Listing Contents with ls — Meaning of . .. ~ and Every Common Option
ls is short for list. It lists the contents of the current directory — files and subdirectories or subfolders. Plain ls gives just names. The teaching value is in the options that reveal type, state, and history.
4.4.1 Long Listing with ls -l
ls -l — hyphen l for long — is long listing. It expands each entry into columns:
- Permissions string for user, group, and others. The first column encodes who can read, write, and execute that file or directory. The session notes deferring the full user-group-other model but tells you to remember that column one is permissions.
- Link count — how many links point to that inode. The session states it will not explain links yet.
- Owner user.
- Owner group — who has permission to work with the entry.
- Size.
- Time of creation or last modification.
- Name.
So a long line tells you not just what exists, but how big it is, who owns it, when it was touched, and what you are allowed to do with it. This is the form you use when permissions or sizes matter.
4.4.2 All Entries Including Hidden with ls -a
Hidden files in Linux are not hidden by an attribute but by naming convention: any file or folder whose name starts with a dot . is hidden. Examples in a typical home include .bashrc and .gnupg. Both regular files and directories can be hidden this way.
lsalone does not show these.ls -a—afor all — shows everything including hidden. The output then includes entries such as.,..,.bashrc,.gnupgalongside visible folders.ls -a -lorls -alcombines both: long detail for every entry including the dotfiles. In that combined view you can see.and..themselves with their permission strings and other columns.
The distinction is visible directly: compare ls versus ls -a in the same directory and the extra dot-prefixed names appear.
4.4.3 The Special Directory Names . .. ~ and /
Four symbols form a shorthand for navigation and listing:
.— a single dot indicates the current directory. It means same directory, and it is hidden in the naming sense. Demonstration:pwdsays/home/ubuntu, thencd .andpwdagain still says/home/ubuntu. Nothing moved. Similarlyls .lists the contents of the current directory and is identical in result to plainls...— two dots indicate the parent directory. Demonstration:pwdshows/home/ubuntu, thencd ..moves to/home. Checking,/homeis the parent of/home/ubuntu. Likewisels ..lists the contents of the parent, not the current directory. It does not move you there; it only displays what is in the parent.~— tilde, described as the left-and-top key before1that you get with Shift, indicates the user home directory.ls ~shows the contents of the user home, in the example the Ubuntu home, and the output matches plainlswhen you are already in that home.cd ~lands in the user home. Barecdwith no argument does the same thing./— a single forward leaning slash is the root, the top level of the file system.
A common learner misinterpretation is to confuse .. with home or ~ with current. The correction repeated in the session is: . is current, .. is parent, ~ is user home, / is root. ls . is current, ls .. is parent, ls ~ is home.
Why two ways to go home, cd and cd ~? Historical usage: cd ~ existed first as the explicit way to say change to user home. Because people used it constantly, implementations added the shortcut that bare cd defaults to the user home. So both remain, doing the same job.
Combinations also make sense once the atoms are clear, though their printed output may look the same while the internal resolution differs:
ls ..— parent directory contents.ls .— current directory contents.ls ../.— parent directory followed by its current entry. When the current directory is/home/ubuntu/SPand its parent is/home/ubuntu, this resolves to the parent's contents.ls ./..— current directory followed by its parent. Same visible result in this tree, different traversal.ls -Rwould be recursive listing of all subfolders, but the immediate point is that dot and dot-dot are composable path components separated by/.
4.4.4 Sorting, Size, Inode, Reverse, Recursive and Human-Readable Options
Beyond l and a, the session walks through the manual page for ls and demonstrates each flag live:
ls -t—tfor sort by modification time, newest first. Example timestamps such as 17:58, 58:53 etc. become ordered with the most recent at the top. Plainlsorls -lwithouttis sorted by name, not by time; addingtreorders by time.ls -S— capitalSsorts by file size, largest first. Lowercasesdoes something different:ls -sprints the allocated size of each file in blocks. CapitalSsorts, lowercasesprints. This pair is a frequent confusion point.ls -r—rfor reverse. IflsshowsF1tozombiein name order,ls -rshowszombietoF1.ls -R— capitalRfor recursive. It descends into every subdirectory and lists their contents as well, for example showing/Desktopwith nothing,/Musicwithusers.txt,/OSwith its files,/Picturesempty, and so on. It is the way to list an entire tree without entering each folder manually.ls -i—ifor inode number. An inode number uniquely identifies a file on the file system.ls -iprints just the inode number alongside each name, for exampleF1with its number,F2with its number. The detailed inode discussion is deferred but the uniqueness property is stated.ls -h—hfor human readable. With long listing it prints sizes in readable units rather than raw blocks. The manual describes it as human readable sizes.- Combinations are normal:
ls -al,ls -lah,ls -l -a -iand so on.
Real-world: In everyday work you combine these without thinking — ls -lah for all plus human sizes plus long detail, ls -lt to find what you just edited, ls -R to audit a project tree. The manual page man ls documents near a dozen variants such as --classify, --format, --sort and the session encourages reading it directly because details like -h versus no header have changed over versions.
Q: What option shows files of a specific type? Is it
ls -lt? What doesamean? A: Notlt.ls -ais the flag for all, including hidden.ls -tsorts by time,ls -lis long. You identify hidden versus non-hidden by the leading dot in the name.
Worked example — sorting and inode options: ls -t sorts by modification time newest first (timestamps 17:58 etc.), ls -S sorts by file size largest first, ls -s prints allocated size in blocks (different from capital S), ls -r reverses name order (F1..zombie becomes zombie..F1), ls -R recursively lists every subdirectory (Desktop, Music, OS, Pictures), ls -i prints inode number uniquely identifying a file, ls -h prints human readable sizes with long listing. Combinations like ls -al, ls -lah, ls -l -a -i are normal. Keywords: ls sorting time newest first size largest first reverse recursive inode human readable options. Also ls long listing permissions link owner group size time name seven columns. Also ls all hidden dotfiles including dot and dot dot hidden identification. Also cd dot stays same directory cd dot dot moves to parent home and tilde home demonstration.
Q: What option shows files of a specific type? Is it ls -lt? What does mean? A: Not lt. ls -a is the flag for all, including hidden. ls -t sorts by time, ls -l is long. You identify hidden versus non-hidden by the leading dot in the name. Keywords: What option shows files of specific type is it ls lt what does a mean Not lt ls minus a flag for all including hidden identified by leading dot.
Q: Confusing dot current versus dot dot parent versus tilde home? A: Correction: . is current ( cd . stays in /home/ubuntu, ls . same as ls), .. is parent (cd .. from /home/ubuntu goes to /home, ls .. lists parent), ~ is user home (ls ~ shows Ubuntu home, cd ~ same as bare cd), / is root. Two ways home cd and cd ~ remain because cd ~ was original explicit form and bare cd was added for convenience. Keywords: Confusing dot current versus dot dot parent versus tilde home leads to inference exercise correction dot current parent tilde home inference.
Q: Why does ls -s versus ls -S confuse beginners? A: ls -s prints allocated blocks per file, ls -S sorts by size largest first. Capital S sorts, lowercase s prints. Keywords: ls minus s prints allocated blocks versus capital S sorts by size frequent confusion.
Pitfalls: Thinking ls alone shows hidden files — it does not, need -a. Confusing .. with home or ~ with current. Missing space in cd .. fails on Linux (works on Windows). Using ls -s when you meant ls -S.
Recap + Bridge: Long -l reveals permissions and metadata, -a reveals hidden dotfiles, . .. ~ / are composable navigation atoms, and -t -S -r -R -i -h cover time, size, reverse, recursive, inode, human readable. Exam note: time, S size, reverse, R recursive, i inode.
4.5 Creating Directories and Files — mkdir and touch and a Concrete Hierarchy
4.5.1 mkdir — Make Directories
mkdir stands for make directories. It creates directories. The syntax is mkdir followed by one or more names. Each name becomes a parameter and a separate folder is created.
You can create several siblings at once: mkdir dir1 dir2 dir3 creates three separate folders inside the current directory with a single command. This is faster than invoking mkdir three times.
4.5.2 A Practice Hierarchy Built Live
The session builds a sample hierarchy under the user home to exercise mkdir, cd, and touch together. The structure, using black for folders and red for files in the slide, is:
sim1/— top project folder under/home/ubuntuWI_Bangalore/— sibling ofbitsandWiproinsidesim1STD1/STD2/bits/Goa/— containspaper.doconly hereHyderabad/— emptyPilani/— emptyWipro/SIM/— containsstudent.docways/— written in the session as ways / WAYS / waste in spoken variants, containingstudent.doc
Live steps shown:
- From home,
mkdir sim1or multiple names at once, thenlsconfirmssim1appears. cd WI_Bangalorethenmkdir STD1 STD2to make two siblings inside it.- Come back with
cd .., thencd bitsandmkdir Goa Hyderabad Pilani— three siblings.lsback in the parent confirms all three. - Back to parent,
cd Wiprothenmkdir ways SIM. - Verify with
ls -Rfromsim1which recursively lists Desktop, Music, OS, Pictures examples and then the sim1 tree, showingbits/Goawithpaper.docandbits/Hyderabad,bits/Pilaniempty, andWipro/SIMwithstudent.docandWipro/wayswithstudent.doc.
The point of the exercise is to create the identical tree on your own machine and share a snapshot taken recursively so the structure is visible without tree graphics. Plain ls -R output interleaves folder headers with their contents, which is how you confirm the shape.
4.5.3 touch — Create Empty Files
touch creates an empty file with zero bytes when the file does not exist. Example: touch tmp then ls -l shows tmp with size 0.
In the hierarchy, touch populates document slots:
- Inside
Wipro/ways,touch student.doccreates the file. - Inside
Wipro/SIM,touch student.docagain creates the parallel file. - Inside
bits/Goa,touch paper.docalone populates only that campus folder. - Later a task asks to create
info.txtinsideWI_Bangalore. The correct form istouch WI_Bangalore/info.txtwithout entering that directory first.
The session also notes that touch with an explicit path both creates and sets an empty file you can later verify with ls -lR.
Student exchange on listing those files without entering each folder:
Q: If I want to check the contents of both
Wipro/waysandWipro/SIMfrom the parent without individually entering each folder, what should I give? A: Use recursive listing.ls -Rorlswith the directory names as arguments while staying inWiproshows first the two folder names present in Wipro and then the contents inside SIM and the contents inside ways. You do not need tocdinto each.
Worked example — mkdir siblings and touch files: mkdir dir1 dir2 dir3 creates three separate folders in one command. In live hierarchy: from home mkdir sim1, cd WI_Bangalore then mkdir STD1 STD2 makes two siblings, cd bits then mkdir Goa Hyderabad Pilani makes three, cd Wipro then mkdir ways SIM makes two. ouch tmp then ls -l shows size 0. Then ouch student.doc in Wipro/ways and Wipro/SIM, ouch paper.doc only in its/Goa, and ouch WI_Bangalore/info.txt without cd first. Verify with ls -R from sim1 showing Desktop Music OS Pictures examples and sim1 tree with bits/Goa paper.doc and Wipro ways/SIM student.doc. Keywords: mkdir multiple arguments creates three siblings WI_Bangalore STD1 STD2 and bits Goa Hyderabad Pilani. Also touch creates zero byte file tmp and student doc in Wipro ways and SIM and paper doc in Goa.
Q: If I want to check the contents of both Wipro/ways and Wipro/SIM from the parent without individually entering each folder, what should I give? A: Use recursive listing. ls -R or ls with the directory names as arguments while staying in Wipro shows first the two folder names present in Wipro and then the contents inside SIM and the contents inside ways. You do not need to cd into each. Keywords: How to check contents of both Wipro ways and SIM without entering each folder Use recursive listing ls minus R shows folders and their contents without cd.
Scope: mkdir creates directories, ouch creates empty zero-byte files when missing (and updates timestamps when existing). Combinations like ls -R audit whole tree without entering each folder.
Recap + Bridge: mkdir builds the skeleton with multiple arguments at once, ouch populates files, ls -R verifies the tree. Next is how to move inside that tree with cd and paths.
4.8 Creating and Editing Files — ed Versus touch
4.8.1 touch — Quick Empty File Creation
touch is presented as the easy recent way to create an empty file. touch filename makes a zero-byte file. In the demonstration touch tmp and then ls -l shows size 0.
4.8.2 ed — The Classic Buffer Editor Workflow
ed is introduced as the older editor family, available long before touch became common. Creating a file with ed requires several steps in sequence:
ed sample.txt— invoke the editor on the desired filename. If the file does not exist it reportsno such file or directorybut still opens the buffer.a— for add. This enters input mode where subsequent lines are collected into the buffer.- Type the content, for example
hello. I am typing things in a new file. .on a line by itself — dot stops adding text.w sample.txt— write. This writes the buffer contents into the named file.q— quit the editor.
Demonstration shows ed sample.txt, then a, then text, then ., then w sample.txt, then q, then cat sample.txt displays hello. I am typing things in a new file. The point is that until w is given the text lives only in the editor buffer; w filename persists it.
4.8.3 Choosing Between touch and ed
Comparison made in the session: touch is very new — described as about five or six years in the surrounding narrative — and was not part of the old family of commands. ed belongs to the old family. For simple empty creation touch is preferred; for typed content the older ed shows the buffer-write-quit model that later editors inherit.
Exercise given: create a file letter.doc in folder1 using ed. The expected sequence is a to add, . to stop, w folder1/letter.doc or w letter.doc depending on your present directory, then q to quit. The four letters a, ., w filename, q summarize the model.
Q: Can I create a file as
W_Bangalore/touch/info? A: No. The first word must be the command.W_Bangaloreis not a command, so the shell reportsnot a command. The correct order istouch W_Bangalore/info.txt— commandtouchfirst, then the path as its parameter.
Q: Does
edwarn before overwriting an existing file? If I create the same name again will it ask? A: No warning. Demonstrated withtouch tempthenedoverwritingtempwithyay I am overriding, then.,w temp,q, andcat tempnow shows the new single line. It just overwrites. Only access permissions can prevent writing; otherwise the editor assumes you intend the write. The session notes that permission-based protection will be covered later and is premature now.
Worked example — ed versus touch: ouch tmp then ls -l shows size 0 zero bytes. ed sample.txt workflow: ed sample.txt (reports no such file if missing but opens buffer), to add, type hello. I am typing things in a new file., . on a line by itself to stop, w sample.txt to write buffer to file, q to quit, then cat sample.txt shows the line. Second example: ouch temp then ed temp with then yay I am overriding then . then w temp then q then cat temp shows the single new line — it just overwrites, no warning. Keywords: ed sample txt add dot write quit creates hello typing new file then cat shows content. Also ed overwriting temp with yay overriding shows no warning only permissions restrict.
Q: Can I create a file as W_Bangalore/touch/info? A: No. The first word must be the command. W_Bangalore is not a command, so the shell reports ot a command. The correct order is ouch W_Bangalore/info.txt — command ouch first, then the path as its parameter. Trigger order of command and path touch must be first word path second not folder slash touch resolution: No first word must be command W_Bangalore is not command correct is touch path. Keywords: Can I create file as W_Bangalore slash touch slash info with touch not first No first word must be command W_Bangalore is not command correct is touch path.
Q: Does ed warn before overwriting an existing file? If I create the same name again will it ask? A: No warning. Demonstrated with ouch temp then ed overwriting emp with yay I am overriding, then ., w temp, q, and cat temp now shows the new single line. It just overwrites. Only access permissions can prevent writing; otherwise the editor assumes you intend the write. Keywords: Does ed warn before overwriting existing file same name again No warning overwrites directly demonstrated temp yay overriding only permissions can prevent.
Scope: ouch is modern quick empty creation; ed is classic buffer editor with . w q model that later editors inherit. ed shows buffer model: text lives only in buffer until w filename persists it.
Recap + Bridge: ouch for empty, ed for typed via . w q, and ed overwrites silently. Next is file display and combining.
4.9 Displaying and Combining Files — cat and Printing with pr
4.9.1 cat — Display and Concatenate
cat is both a display and a concatenation tool. Beyond cat file to show contents, cat file1 file2 > file3 concatenates. The session builds two files with ed to illustrate:
- Preparation: using
ed, addthis is first linethen.thenw sim1/Wipro/ways/student.doc, similarlythis is my second linewritten tosim1/Wipro/SIM/student.doc. Thencatshows each file individually.
Then the task: create a new document named final.doc under Wipro whose content is the concatenation of student.doc under ways followed by student.doc under SIM, using absolute paths.
Correct construction uses cat with redirection: cat /home/ubuntu/sim1/Wipro/ways/student.doc /home/ubuntu/sim1/Wipro/SIM/student.doc > /home/ubuntu/sim1/Wipro/final.doc. The > takes the combined stdout of the two cats and writes it into the destination absolute path. The session initially tries cat to combine and shows the concatenation working.
4.9.2 pr — Formatting for Printing
pr is introduced for printing preparation. man pr says pr converts text files for printing. Since no printer is attached the demo skips actual printing, but notes key behaviors: every page has 66 lines, date and time header, multi-column options. Examples: pr file1 file2 for basic printing format, pr -3 file to print in three columns, pr -j to merge full lines without column alignment, pr -m to print all files in parallel one in each column. The takeaway is that pr formats rather than just dumps like cat.
Worked example — cat concatenate and pr format: Using ed, add his is first line then . then w sim1/Wipro/ways/student.doc, similarly his is my second line to sim1/Wipro/SIM/student.doc. Then cat /home/ubuntu/sim1/Wipro/ways/student.doc /home/ubuntu/sim1/Wipro/SIM/student.doc > /home/ubuntu/sim1/Wipro/final.doc concatenates with > redirection. cat shows each file individually. For printing, pr converts text for printing: every page 66 lines, date time header, pr -3 file prints three columns, pr -j merges lines, pr -m prints files in parallel one per column. man pr confirms. Keywords: cat concatenates student doc ways and SIM into final doc using absolute paths with redirection.
Scope: cat displays and concatenates (cat file1 file2 > file3), pr formats for printing (66 lines, headers, columns) rather than just dumping. No printer needed for demo but behavior is documented.
Recap + Bridge: cat merges, pr paginates. Both prepare content that is then redirected.
4.10 Redirection > and Append >> — Building, Redirecting, and Updating Files
Two redirection symbols are contrasted:
>— single greater-than — writes stdout into a file, creating the file if needed or overwriting it if it exists.>>— two greater-than — appends to a file, updating its contents without discarding what was already there.
Three concrete uses in the session:
4.10.1 Capturing ls Output
Assume your present working directory is Goa which is sim1/bits/Goa. Store the result of ls -l -a -i into a file results.txt in Goa itself.
Steps: cd sim1/bits/Goa to ensure present is Goa, then ls -l -a -i > results.txt. The command generates an output but the output is not printed on the screen; it is redirected into results.txt. Verifying with cat results.txt shows the long, all, inode listing that was generated.
4.10.2 Concatenation into a Final Document
As above, cat file1 file2 > newfile.txt uses > to write the concatenated contents into a new file. Example with absolute paths all three — two sources and the destination /home/ubuntu/sim1/bits/newfile.txt — succeeds only when each absolute directory actually exists; an early attempt failed with no such file or directory because the intermediate path /home/bits does not exist until written correctly as /home/ubuntu/sim1/bits.
4.10.3 Updating Versus Overwriting info.txt — Relative Path Pitfall
Prompt: you are in bits which is /home/ubuntu/sim1/bits. You wish to update the contents of info.txt which is present in WI_Bangalore — note WI_Bangalore is a sibling of bits inside sim1, not a child of home or root.
Three candidate commands are discussed, all claimed to use relative path:
/WI_Bangalore/...with leading slash — wrong because leading/means root. Under rootWI_Bangaloredoes not exist.~/WI_Bangalore/...with tilde — wrong because~is user home/home/ubuntu, and under thatWI_Bangaloredoes not exist.WI_Bangaloreis undersim1, not directly under home.- The third variant also with tilde suffers the same location error.
So none of the three paths are correct in terms of location, and the correct missing path would need ../WI_Bangalore/info.txt from bits — .. to sim1, then WI_Bangalore/info.txt.
Beyond location, the update intent matters: the question says update the contents, not rewrite. To append you must use >> not >. A single > would replace the file; two >> appends.
Q: Which of the three options correctly updates
info.txtusing relative path? Several peers split between the second and third, one says none. A: None is correct for the location, because all three miss thesim1component and misplaceWI_Bangalore. For the operation, updating requires>>. An update would look likeecho new line >> ../WI_Bangalore/info.txtfrombits, using..to reachsim1first and>>to append.
Exam note: Expect traps of this form — a path that looks plausible but fails because WI_Bangalore is not under root or not directly under ~, and a symbol choice that tests whether you know append is >> while write is >.
Worked example — redirection pitfalls: From Goa which is sim1/bits/Goa, ls -l -a -i > results.txt generates output but not printed; cat results.txt verifies the long all inode listing was redirected. Second: cat file1 file2 > newfile.txt with absolute paths fails with o such file or directory when intermediate path /home/bits does not exist until correctly /home/ubuntu/sim1/bits. Third: from its which is /home/ubuntu/sim1/bits updating info.txt in WI_Bangalore (sibling under sim1 not child of home or root) none of three options /WI_Bangalore/... (root) ~/WI_Bangalore/... (home) are correct because WI_Bangalore lives under sim1. Correct missing path is ../WI_Bangalore/info.txt (.. to sim1). Update needs append >> not overwrite >; echo new line >> ../WI_Bangalore/info.txt appends. Keywords: ls -l -a -i redirected with greater into results txt in Goa and verified with cat. Also info txt update requires append two greater symbols none of three relative paths correct missing sim1. Also Single greater writes overwrite double greater appends update distinction for info txt. Also leading slash means root tilde means home WI_Bangalore under sim1.
Q: Which of the three options correctly updates info.txt using relative path? Several peers split between the second and third, one says none. A: None is correct for the location, because all three miss the sim1 component and misplace WI_Bangalore. For the operation, updating requires >>. An update would look like echo new line >> ../WI_Bangalore/info.txt from its, using .. to reach sim1 first and >> to append. Trigger three options slash WI versus tilde WI versus tilde WI for info txt from bits resolution none correct missing sim1 component correct is dot dot WI_Bangalore double greater append. Keywords: Which of three options correctly updates info txt using relative path from bits None is correct all miss sim1 component and misplace WI_Bangalore update needs double greater append.
Q: When to use > versus >>? A: Single > writes stdout into a file, creating or overwriting. Double >> appends without discarding. Question says update not rewrite, so must use >>. Keywords: Single greater writes overwrite double greater appends update distinction for info txt.
Pitfalls: Using > when you need >> loses history. Using leading / for relative or ~ for a sibling under sim1 misplaces file. Forgetting directory must exist before absolute cat redirection.
Recap + Bridge: > creates or overwrites, >> appends; location needs ../WI_Bangalore not /WI_Bangalore or ~/WI_Bangalore. Next is copying and inspecting with cp and stat.
4.11 Copying with cp and Statistics with stat
4.11.1 cp — Copy Options and Their Behaviors
cp copies contents from a source file to a destination file. It requires two parameters: source and destination, as in cp file1.doc file2.doc.
Demonstrated options, each with meaning:
cp -i source destination—ifor interactive. Prompts before overwriting. Examplecp -i results.txt paperasksDo you want to overwrite?If you answeryesit overwrites; ifnoit keeps the destination. This guards against accidental overwrite.cp -p—pfor preserve. Preserves mode, ownership, and timestamps of the source as is in the destination.cp -f—ffor force. If an existing destination file cannot be opened, remove it and try again. Described as forceful copy.cp -R— capitalRfor recursive. Copies directories recursively. This copies a directory and all its contents.cp -u—ufor update. Copies only when the source file is newer than the destination file, or when the destination is missing. If the destination is newer, no copy happens.cp -n—nfor no overwrite. Does not overwrite an existing file. This stops you from accidentally overwriting.cp -v—vfor verbose. Prints informative messages about what is being done.- Additional options for symbolic links are mentioned but skipped because links have not been introduced yet, and the session says they will not appear in the immediate assessment.
The worksheet tasks repeat these: create two files with this is first file and this is second file as contents, then try cp -u in both time orders to see whether the update happens depending on which is newer.
4.11.2 stat — File Statistics Field by Field
stat gives statistics of a file. Example stat results.txt prints:
- File name.
- Size on disk and number of blocks consumed, plus the I/O block size.
- File type — regular file versus device file or character file. At this stage treat it as regular file; device details are deferred.
- Device ID.
- Inode number — the same unique number seen with
ls -i— and how many links it has. - Access permissions for user, group, and others.
- User ID and group ID — both 1000 in the demo because the file belongs to the
ubuntuuser. - Three timestamps: access, modify, and change. The session explicitly says the difference between modify and change is subtle and will be clarified later; for now just note that they are distinct and you should try the commands to observe the difference.
Understanding stat lets you see the inode behind a name and the metadata that ls -l summarizes.
Worked example — cp options and stat fields: cp requires source and destination: cp file1.doc file2.doc. Options: cp -i interactive prompts Do you want to overwrite? yes overwrites no keeps; cp -p preserves mode ownership timestamps; cp -f force removes destination if cannot open and tries again; cp -R recursive copies directories; cp -u update copies only when source newer or destination missing; cp -n no overwrite never overwrites; cp -v verbose prints what is done. Worksheet: create his is first file and his is second file then try cp -u both orders to see time dependence. stat results.txt fields: File name, Size on disk and blocks consumed plus I/O block size, File type regular versus device character, Device ID, Inode number same as ls -i and link count, Access permissions for user group others, UID GID both 1000 for ubuntu user, three timestamps access modify change — modify versus change subtle deferred. Keywords: cp interactive prompts before overwrite preserve mode force recursive update no overwrite verbose options. Also stat results txt shows size blocks IO block inode permissions UID GID access modify change times.
Scope: cp copies file contents, not directories unless -R. Symbolic link options skipped until links introduced. stat reveals inode and metadata that ls -l summarizes.
Recap + Bridge: cp guards (-i -n -u) and preserves (-p -v -R -f), stat audits. Next is relocation and deletion: mv, mdir, m.
4.12 Moving and Removing — mv, rmdir, and rm
4.12.1 mv — Move
mv physically moves a file or directory from a source folder to a destination folder. Replace the word place with folder. Example mv results /home/ubuntu moves the file results into the user home.
Option mv -i — i for interactive — should ask before moving. Demonstration with mv -i from the current directory to home showed that in this environment it did not prompt, but the file still moved: checking the current directory shows it is no longer there, checking the home shows results.txt now present there. rm -i contrastingly does prompt.
4.12.2 rmdir — Remove Empty Directories
rmdir is remove directory but only for empty directories. It takes the directory name as a parameter and removes it only if it contains no files or subfolders. This restriction is intentional.
4.12.3 rm — Remove Files and Recursive Deletion
rm removes a single file. Examples:
rm -i paper.doc—ifor interactive — asks whether you want to remove the file. Answeringnokeeps it;yesremoves. This was shown to work.rm -R— capitalRfor recursive — deletes all files in all subdirectories. Combined withffor force,rm -R -forrm -rfdeletes everything under the current working directory including folders, subfolders, and sub-subfolders without further prompting. This is forceful deletion, and the session warns to use it deliberately.rm -falso allows forced removal even if the file is write-protected, though the core teaching is recursive plus force.
Student interaction at the end clarifies a common confusion:
Q:
rmdirdid not work when the directory had folders and files inside. Can we remove a directory if it is not empty? A: Not withrmdir.rmdironly removes empty directories. To delete a directory even if it is not empty you need the options ofrm, specifically the recursive and forceful formrm -Randrm -f. The exact command for non-empty directory removal is promised for the next class, but the principle —rmdirfor empty,rm -R -ffor everything — is established now.
Exam note: Expect to distinguish rmdir versus rm -R, and to know that rm -i prompts while rm -f forces.
Worked example — mv, rmdir, rm: mv results /home/ubuntu physically moves file to user home. mv -i should ask before moving but demo did not prompt yet file still moved — m -i does prompt contrast. mdir removes only empty directories: mdir dirname succeeds only if no files/subfolders. m paper.doc removes single file; m -i paper.doc asks yes removes o keeps; m -R recursive deletes all files in all subdirectories, m -R -f or m -rf deletes everything under current without prompting including folders subfolders force even if write-protected. Warning to use deliberately. Keywords: mv moves file to home rm interactive prompts rm recursive force deletes tree rmdir only empty. Also rmdir only empties need rm recursive force for non empty next class.
Q: mdir did not work when the directory had folders and files inside. Can we remove a directory if it is not empty? A: Not with mdir. mdir only removes empty directories. To delete a directory even if it is not empty you need the options of m, specifically the recursive and forceful form m -R and m -f. The exact command for non-empty directory removal is promised for the next class, but the principle — mdir for empty, m -R -f for everything — is established now. Keywords: rmdir did not work when directory had folders files inside can we remove non empty Not with rmdir only empties need rm recursive force for non empty next class. Also rmdir did not work when directory had folders files inside can we remove non empty Not with rmdir only empties need rm recursive force for non empty next class.
Pitfalls: Trying mdir on non-empty — fails silently by design. Using m -rf without checking pwd deletes from wrong place — catastrophic on shared server. Expect m -i prompts while m -f forces.
Recap + Bridge: Move with mv, empty-only mdir, full m -R -f, interactive m -i. Next is consolidated practice pulling all path and file operations together.
4.13 Consolidated Practice — Worksheets and Copy/Move Tasks
4.13.1 Integrated Worksheet Set
Worksheets referenced in the session pull together the path and file operations:
- Create directories and files using both
mkdirandtouchored, then usecatwith absolute paths to produce a combined file. - Use
cpwith each option-i,-p,-f,-R,-u,-n,-vto observe overwrite prompting, preservation, forced removal, recursive copy, update-only-when-newer, and no-overwrite behavior. - Use
statto inspect size, blocks, inode, links, permissions, UID/GID, and the three timestamps after copying. - Use
mv -iandrm -i,rm -R,rm -fto experience the interactive prompt difference and the power of recursive deletion. - Use
ls -l -a -i,ls -t,ls -S,ls -r,ls -R,ls -h,ls -s, andls -sversusls -Sto internalize sorting and size reporting.
4.13.2 Execution Advice
The recurring advice is to try each command yourself exactly as shown, because parameters like /home/ubuntu/sim1 versus WI_Bangalore fail silently with no such file or directory until the path spelling matches the real tree.
Worked example — integrated worksheets: Build exact hierarchy with mkdir taking multiple arguments at once and ouch with explicit relative or absolute paths, then verify with ls -R. Tasks: cat file1 file2 > newfile.txt with absolute paths, cp -i -p -f -R -u -n -v to observe overwrite prompting preservation forced recursive update no-overwrite verbose, stat to inspect size blocks inode links permissions UID GID access modify change, mv -i and m -i rm -R rm -f for interactive versus recursive force, ls -l -a -i, ls -t, ls -S, ls -r, ls -R, ls -h, ls -s versus ls -S to internalize sorting size reporting. Verify with ls -R interleaves folder headers with contents to confirm shape. Keywords: worksheets practice captures recursive listing and copy move tasks. Also worksheets practice captures recursive listing and copy move tasks.
Execution advice: Try each command exactly as shown; parameters like /home/ubuntu/sim1 versus WI_Bangalore fail with o such file or directory until spelling matches real tree. Use ls -R snapshot to share structure without tree graphics.
Recap + Bridge: Worksheets integrate building, moving, copying, listing, and inspecting — the full daily loop. Appendices next collect exam traps and industry uses.
Exam Guidance Summary
All marks-related guidance that appeared inline is collected here:
- Absolute path questions are trap-heavy: absolute always starts with
/(root), relative never does. If a question asks for absolute, the answer must begin with/; if it asks for relative, it must be computed from the stated present working directory and must use..correctly. - Common wrong paths are those that place
WI_Bangaloredirectly under root (/WI_Bangalore) or directly under user home (~/WI_Bangalore). In the constructed hierarchyWI_Bangalorelives undersim1, so a correct absolute is/home/ubuntu/sim1/WI_Bangalore/...and a correct relative frombitsis../WI_Bangalore/.... - Redirection symbol choice is tested:
>is write or overwrite,>>is append or update. An update question expects>>. Writing a new file may use>. mkdir,cd, andtouchsyntax expects a space between command and argument;cd..is incorrect on Linux though it works on Windows.edoverwrites without warning; there is no interactive guard likecp -i. Only permissions restrict it.lssorting:tfor time newest first,Sfor size largest first,rfor reverse,Rfor recursive,ifor inode,afor all,lfor long,hfor human readable,sfor allocated blocks. Do not confuses(print size) withS(sort by size).cpflags likely to be examined:iinteractive before overwrite,ppreserve mode ownership timestamps,fforce,Rrecursive directories,uupdate only when source newer,nno overwrite,vverbose.statcontents: file name, size, blocks, I/O block, file type, device ID, inode number, link count, access permissions, UID/GID, access modify change times. Modify versus change has a subtle distinction to be detailed later.rmdirremoves only empty directories; non-empty removal usesrm -Rwith optional-ffor force. The full non-empty removal command beyondrmdiris deferred to the next lecture.prformats for printing: 66 lines per page, headers,pr -3three columns,pr -jmerge lines,pr -mparallel.catdisplays or concatenates;prformats;ededits;touchcreates empty.- Presentation advice implied: build the exact folder tree with
mkdirtaking multiple arguments at once andtouchwith explicit relative or absolute paths, then verify withls -R.
Exam note: Absolute always starts with / (root), relative never does. From bits ../WI_Bangalore/info.txt is correct relative, /WI_Bangalore or ~/WI_Bangalore miss sim1. Update expects >> not >; mkdir cd touch need space; ed overwrites without warning; ls flags time S size reverse R recursive i inode all l long h human readable s blocks; cp -i -p -f -R -u -n -v; stat shows size blocks inode permissions UID GID access modify change; mdir empty only, m -R -f for non-empty; pr 66 lines.
Key Industry Applications
Real-world connections that appeared with the concepts:
- Real-world:
GCC, the GNU Compiler Collection, as a canonical example of a command with dozens of options whose documentation you read offline withman gccversus online HTML rendered from the same pages. The man system gives you internet-free reference on any Linux development machine. - Real-world: Hidden shell startup file
.bashrcthat runs at login, used in practice to auto-cdinto a project directory so every terminal session starts where you work, a standard developer workflow on shared servers and personal machines. - Real-world: Two-way terminal chat via
writeand broadcast viawallpaired withwhoto see who is available, historically used for sysadmin coordination on multi-user servers before modern chat tools. - Real-world: Human readable
ls -h, time-sortedls -lt, size-sortedls -S, and recursivels -Rfor daily project navigation, build artifact inspection, and log triage, complemented by inode toolsls -iandstatfor file system debugging and linkage checks. - Real-world:
touchas the modern quick way to create empty files and update timestamps in build systems, versusedas the historical lineage of Unix editors whosea,.,w,qbuffer model survives in tools likevi. - Real-world: Path strategy in scripts — absolute paths from root
/home/ubuntu/...for stable job configurations that must work from any working directory, and relative paths with..and.for portable repository layouts where the checkout location varies. - Real-world: File flow with redirection
>for capturingls -linto reports (ls -l -a -i > results.txt), concatenation withcat file1 file2 > final.docfor log merging or document assembly, and append>>for updating logs without losing history such asecho >> info.txt. - Real-world: Copy guards
cp -ito prevent accidental overwrite in production,cp -pto preserve ownership and timestamps during backups,cp -ufor incremental updates where only newer sources propagate, andcp -Rfor directory trees, all mirrored in release engineering pipelines. - Real-world:
statfor forensics — checking inode numbers, block usage, ownership IDs, and access modify change times during debugging of build caches or deployment issues, with UID/GID1000as the typical single-user ownership marker. - Real-world: Printing pipeline
prwith 66-line paging and column merging for legacy report formatting, still referenced in documentation for text file preparation before sending to physical printers.
Real-world tie-in: GCC man pages give offline compiler reference; .bashrc auto-cd is standard developer workflow; write/wall with who coordinated sysadmins before modern chat; ls -lah, ls -lt, ls -R, stat, ouch timestamps, redirection > >>, cp -i -p -u -R, and pr 66-line paging all map to release pipelines, build caches, and log merging in production.
SP Lecture 4 notes · Linux Commands and File System Navigation
Sections Breakdown
Two-way channel write, broadcast wall and presence discovery with who, mesg and Ctrl+D lifecycle.
On-system manual pager man and the GCC manual as a rich example of offline documentation with Q to quit.
pwd as print working directory, login home placement and hidden .bashrc startup file.
ls long listing columns, hidden dotfiles with -a, . .. ~ / atoms and sorting flags -t -S -r -R -i -h.
mkdir with multiple arguments and touch for empty files, verified by recursive ls -R in the sim1 hierarchy.
cd syntax spacing, variants . .. ~ / and absolute from root versus relative from present with three Goa variations.
Student attempts from STD1 to ways, Pilani to ways, absolute under STD1 and mkdir ./../newdir trap counting .. steps.
Quick empty touch versus classic ed buffer model a . w q and silent overwrite with permission-only guard.
cat display and concatenate with redirection into final.doc and pr formatting 66 lines, headers and columns.
Capturing ls -l -a -i into results.txt, concatenation with > and appending with >> and the WI_Bangalore location trap.
cp flags -i -p -f -R -u -n -v and stat fields size blocks inode permissions UID GID and three timestamps.
mv move with -i, rmdir empty-only and rm -i -R -f recursive forceful deletion for non-empty trees.
Integrated worksheet set tying mkdir touch cat cp stat mv rm and ls variants into a daily workflow loop.
Consolidated exam traps: absolute vs relative, > vs >>, spacing, ed overwrite, ls and cp flags, stat and removal.
Real-world maps to GCC man pages, .bashrc workflow, write/wall coordination, build pipelines, log merging and forensics.
Exam Revision Notes
Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.
Inter-User Communication — write and wall
Must-know: Key takeaway from 4.1 Inter-User Communication — write and wall
âš ï¸ Top pitfall: Common pitfall in 4.1 Inter-User Communication — write and wall
Self-check: Question from 4.1 Inter-User Communication — write and wall
Connects to: None — standalone
Manual Pages — man and the GCC Example
Must-know: Key takeaway from 4.2 Manual Pages — man and the GCC Example
âš ï¸ Top pitfall: Common pitfall in 4.2 Manual Pages — man and the GCC Example
Self-check: Question from 4.2 Manual Pages — man and the GCC Example
Connects to: None — standalone
Present Working Directory — pwd, Home Placement, and Hidden Startup Files
Must-know: Key takeaway from 4.3 Present Working Directory — pwd, Home Placement, and Hidden Startup Files
âš ï¸ Top pitfall: Common pitfall in 4.3 Present Working Directory — pwd, Home Placement, and Hidden Startup Files
Self-check: Question from 4.3 Present Working Directory — pwd, Home Placement, and Hidden Startup Files
Connects to: None — standalone
Listing Contents with ls — Meaning of . .. ~ and Every Common Option
Must-know: Key takeaway from 4.4 Listing Contents with ls — Meaning of . .. ~ and Every Common Option
âš ï¸ Top pitfall: Common pitfall in 4.4 Listing Contents with ls — Meaning of . .. ~ and Every Common Option
Self-check: Question from 4.4 Listing Contents with ls — Meaning of . .. ~ and Every Common Option
Connects to: None — standalone
Creating Directories and Files — mkdir and touch and a Concrete Hierarchy
Must-know: Key takeaway from 4.5 Creating Directories and Files — mkdir and touch and a Concrete Hierarchy
âš ï¸ Top pitfall: Common pitfall in 4.5 Creating Directories and Files — mkdir and touch and a Concrete Hierarchy
Self-check: Question from 4.5 Creating Directories and Files — mkdir and touch and a Concrete Hierarchy
Connects to: None — standalone
Navigating with cd — Syntax Rules and Absolute versus Relative Paths
Must-know: Key takeaway from 4.6 Navigating with cd — Syntax Rules and Absolute versus Relative Paths
âš ï¸ Top pitfall: Common pitfall in 4.6 Navigating with cd — Syntax Rules and Absolute versus Relative Paths
Self-check: Question from 4.6 Navigating with cd — Syntax Rules and Absolute versus Relative Paths
Connects to: None — standalone
Guided Navigation Exercises and Reasoning
Must-know: Key takeaway from 4.7 Guided Navigation Exercises and Reasoning
âš ï¸ Top pitfall: Common pitfall in 4.7 Guided Navigation Exercises and Reasoning
Self-check: Question from 4.7 Guided Navigation Exercises and Reasoning
Connects to: None — standalone
Creating and Editing Files — ed Versus touch
Must-know: Key takeaway from 4.8 Creating and Editing Files — ed Versus touch
âš ï¸ Top pitfall: Common pitfall in 4.8 Creating and Editing Files — ed Versus touch
Self-check: Question from 4.8 Creating and Editing Files — ed Versus touch
Connects to: None — standalone
Displaying and Combining Files — cat and Printing with pr
Must-know: Key takeaway from 4.9 Displaying and Combining Files — cat and Printing with pr
âš ï¸ Top pitfall: Common pitfall in 4.9 Displaying and Combining Files — cat and Printing with pr
Self-check: Question from 4.9 Displaying and Combining Files — cat and Printing with pr
Connects to: None — standalone
Redirection > and Append >> — Building, Redirecting, and Updating Files
Must-know: Key takeaway from 4.10 Redirection > and Append >> — Building, Redirecting, and Updating Files
âš ï¸ Top pitfall: Common pitfall in 4.10 Redirection > and Append >> — Building, Redirecting, and Updating Files
Self-check: Question from 4.10 Redirection > and Append >> — Building, Redirecting, and Updating Files
Connects to: None — standalone
Copying with cp and Statistics with stat
Must-know: Key takeaway from 4.11 Copying with cp and Statistics with stat
âš ï¸ Top pitfall: Common pitfall in 4.11 Copying with cp and Statistics with stat
Self-check: Question from 4.11 Copying with cp and Statistics with stat
Connects to: None — standalone
Moving and Removing — mv, rmdir, and rm
Must-know: Key takeaway from 4.12 Moving and Removing — mv, rmdir, and rm
âš ï¸ Top pitfall: Common pitfall in 4.12 Moving and Removing — mv, rmdir, and rm
Self-check: Question from 4.12 Moving and Removing — mv, rmdir, and rm
Connects to: None — standalone
Consolidated Practice — Worksheets and Copy/Move Tasks
Must-know: Key takeaway from 4.13 Consolidated Practice — Worksheets and Copy/Move Tasks
âš ï¸ Top pitfall: Common pitfall in 4.13 Consolidated Practice — Worksheets and Copy/Move Tasks
Self-check: Question from 4.13 Consolidated Practice — Worksheets and Copy/Move Tasks
Connects to: None — standalone
Exam Guidance Summary
Must-know: Key takeaway from Exam Guidance Summary
âš ï¸ Top pitfall: Common pitfall in Exam Guidance Summary
Self-check: Question from Exam Guidance Summary
Connects to: None — standalone
Key Industry Applications
Must-know: Key takeaway from Key Industry Applications
âš ï¸ Top pitfall: Common pitfall in Key Industry Applications
Self-check: Question from Key Industry Applications
Connects to: None — standalone
Was this lecture useful?
BitsNotes AI Assistant
Subject Notes AssistantConfigure AI Chat
Choose how to access the chatbotSigned in as
Powered by BitsNotes — 20 messages per day. No API key needed. Want unlimited access? Use "Bring Your Own Key" mode.
Sign in to use AI Chat
Get 20 free AI messages per day to ask questions about your lecture notes. Sign in with Google or GitHub — it takes 5 seconds.
Sign In to BitsNotesSwitch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.