You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1.2 KiB

Lab3 Solution Amirlan Sharipov (BS21-CS-01)

Question 1

Pipe takes stdout of one command and forwards it to another as stdin

Question 2

File formats and conventions

Question 3

which ls
/usr/bin/ls

Question 4

mv test_file.tot test_file.txt rename 's/tot/txt/' test-file.tot

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

Question 6

ping 127.0.0.1 &> /dev/null

Question 7

sort | nl -ba > output.txt

Question 8

cd home/rinri/testdir cd ..../home/rinri/testdir cd ~/testdir cd; cd testdir

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