Professional Documents
Culture Documents
Lab 2
Lab 2
Before you start the following command, make sure you are log in as super user to
have administrator privileges.
Type lastlog
Give a list of every single user plus the last time they logged in (or "never
logged in" if that user had not logged in ever).
CC 216 Operating Systems Jan-Apr 2021
Type deluser
Enter username that you want to delete
Evaluate the result.
CC 216 Operating Systems Jan-Apr 2021
Now, switch back to normal user account in order to avoid deleting or overriding
system files accidently.
Like above however, since the "-i" (interactive) option is specified, if file3
exists, the user is prompted before it is overwritten with the contents of file1.
Try:
CC 216 Operating Systems Jan-Apr 2021
i. Copy the contents of file1 (into a file named file1) inside of directory
newdir.
ii. Copy the contents of the directory linuxstuff. If directory newdir does
not exist, it is created. Otherwise, it creates a directory named newdir
Type rm <filename>
Type rm file1
Type rm –i file2
Evaluate the answer