Lab3 Solution Amirlan Sharipov (BS21-CS-01)
Table of Contents
1. Question 1
Pipe takes stdout of one command and forwards it to another as stdin
2. Question 2
File formats and conventions
3. Question 3
which ls
/usr/bin/ls
4. Question 4
mv test_file.tot test_file.txt rename ’s/tot/txt/’ test-file.tot
5. Question 5
echo -e "The location of hundreds of crab pots\nLittle Red Riding Hood\nThe location of hundreds of crab pots\nThe location of hundreds of crab pots\nThe sound of thunder\nEight hours in a row\nAll aboard\nEight hours in a row" | sort | uniq > newfile.txt; whoami >> newfile.txt
6. Question 6
ping 127.0.0.1 &> /dev/null
7. Question 7
sort | nl -ba > output.txt
8. Question 8
cd home/rinri/testdir cd ..../home/rinri/testdir cd ~/testdir cd; cd testdir
9. Question 9
awk -F ':' '{print $7;}' /etc/passwd | sort | uniq
/bin/bash /bin/false /bin/zsh /sbin/nologin /usr/bin/git-shell /usr/bin/nologin