1. |
In the terminal: cp hello.c hello2.c |ENTER| mv hello2.c hello_friend.c |ENTER| mkdir new |ENTER| mv hello_friend.c new |ENTER| |
|
2. |
sed 's/[Hh]ello [Ww]orld/Hello Friend/' hello.c > new/hello_friend.c |ENTER|
|
|
3. |
cp hello.c tmp |ENTER| for nnm in Juan Susana Britt ; do sed "s/World/${nnm}/" tmp > hello_${nnm}.c ; gcc -o hello_${nnm} hello_${nnm}.c ; done |ENTER| ./hello_Susana |ENTER| ./hello_Britt |ENTER|
|
Hello Susana Hello Britt |
4. |
cd /root |ENTER| tar -czvf myStuff.tar.gz hello.c bench.py new |ENTER| ls |ENTER| mkdir some |ENTER| cd some |ENTER| tar -xzvf ../myStuff.tar.gz |ENTER| ls |ENTER| ls new |ENTER| pwd |ENTER|
|
hello.c bench.py new/ new/hello_friend.c
bench.py hello_Brit hello_Juan hello_Susana.c tmp hello hello_Brit.c hello_Juan.c myStuff.tar.gz hello-banksy.c hello.c hello_Susana new
hello.c bench.py new/ new/hello_friend.c
bench.py hello.c new ls new hello_friend.c
/root/some
|
5. |
cd ~ |ENTER| ls -l hello |ENTER| chmod g-x,o-x,o-r hello |ENTER| ls -l hello |ENTER|
|
-rwxr-xr-x 1 root root 9448 Sep 18 12:13 hello
-rwxr----- 1 root root 9448 Sep 18 12:13 hello |
|
|
|
6. |
Login and open the terminal: |
|
|
|
|
7. |
ssh user@132.248.131.98 |ENTER| |
The answers here will not be equal to what you get, just a hint.
user@132.248.131.98's
password:
|
8. |
pwd |ENTER| ls |ENTER| |
/home/user bin curso progs proy sd.log test |
9. |
man pwd |ENTER|
seq
-w 1 3.1416 300 > myseq1 |ENTER| grep "1416" myseq3 |ENTER| grep "4" myseq3 | more |ENTER| sort -k 2 myseq3 | more |ENTER| cat myseq3 |ENTER| cat myseq3 | wc -l |ENTER| grep "8" myseq3 | tr "\t" "/" |ENTER| sort -k 2 myseq3 | head -n 10 | sort -k 1 > myseq_top |ENTER| cat myseq_top |ENTER| sort -k 1 myseq3 | tail -n 15 | sort -k 2 > myseq_bottom |ENTER| cat myseq_top |ENTER|
for
nnm in `seq 1 4 500 ` ; more myrandseq |ENTER|
|
|
10. |
logout |ENTER| |
connection closed to 132.248.131.98 |