# # Test #1 answer - Script Section - 66 marks - 4 of 10% # # Step 1 - 4 marks cd # optional to make sure I'm in my home directory mkdir test1 cd test1 # Step 2 - 13 marks mkdir subdir date >subdir/dateout.txt cp subdir/dateout.txt subdir/two.txt mv subdir/dateout.txt date.txt rm -r subdir # Step 3 - 10 marks touch one two three # or >one >two >three ls -ls ??? rm ????? # Step 4 - 10 marks head -26 /etc/passwd | tail -10 | sort -r >password_reverse.txt # Step 5 - 3 marks sort password_reverse.txt >password_sorted.txt # Step 6 - 6 marks grep /bin/bash /etc/passwd | wc -l # Step 7 - 4 marks grep -v nameserver /etc/resolv.conf # Step 8 - 5 marks ls /lib/lib* | wc -l # Step 9 - 5 marks file /bin/* | grep script # Step 10 - 3 marks ls -l /lib/*ss* # Step 11 - 3 marks # See online VIM tutorial section 4.4 and 5.2 # :%s/0/O/g # :w badpasswd.txt