Microsoft Word – Chengeng Xiao.docx
Chengeng Xiao
Student ID: 913186040
ECS30
Assigment 2 Linux
Professor Bishop
1: (15 points) Suppose I have a file named x in my home directory. File
y is a (hard) link to this file, and file z is a symbolic link to it. I now
type:
1, cat x: No such file or directory. Because x is no longer in
the location
2,cat y: print the information in x. Because y is a hard link
of x, can read x even the location is changed
3,cat z: No such file or directory. Because z is a symbolic
link that links to the location that no longer saves x’s information.
No such file or directory
2, (5 points) Give a one-line Linux command that replaces every blank
space with the letter ‘X’ in a file.
tr “ ” “x” < filename 3, (5 points) Give a Linux command that prints the calendar for the month of September in 1752. What is unusual about that month? The command is : cal 9 1752 There are some dates missing in the calendar.