| 1 | cd /home/kremlin |
| 2 | echo "Printing contents of home directory" |
| 3 | ls -lah /home/kremlin |
| 4 | echo "cd'ing to \"Desktop\" (although I'm using a tiled WM that doesn't support the XDG Desktop directory)" |
| 5 | cd /home/kremlin/Desktop |
| 6 | cd |
| 7 | echo "Printing working directory" |
| 8 | pwd |
| 9 | echo "Creating \"Backups\" directory" |
| 10 | mkdir ~/Backups |
| 11 | echo "Writing name/SUID into /tmp/hw2" |
| 12 | # I thought you meant something about the SUID permissions bit at first :) |
| 13 | echo -ne "Ian Sutton\n417517518" > /tmp/hw2 |
| 14 | echo "Copying it to \"Backups\" folder" |
| 15 | cp /tmp/hw2 ~/hw2 |
| 16 | echo "Removing original" |
| 17 | rm /tmp/hw2 |
| 18 | echo "Listing contents of \"Backups\" folder" |
| 19 | ls ~/Backups |
| 20 | echo "Deleting \"Backups\" folder" |
| 21 | rm -rf ~/Backups |