Looking for Introduction aux Système d'Exploitation 1 test answers and solutions? Browse our comprehensive collection of verified answers for Introduction aux Système d'Exploitation 1 at esiclass.esi.dz.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Scenario A
user1@PC:~$ ls -ld / /home/ .
drwxrwxr-x 11 user1 user1 4096 Jan 18 08:29 .
drwxr-xr-x 25 root root 4096 Nov 13 12:55 /
drwxr-xr-x 8 root root 4096 Jan 14 01:59 /home/
user1@PC:~$ umask
0002
user1@PC:~$ groups user1 user2 user3 root
user1 : user1 user3
user2 : user2 user1
user3 : user3 user2
root : root
user1@PC:~$ mkdir source destination
user1@PC:~$ chmod o+rwx destination/
user1@PC:~$ chmod g+rwx source/
user1@PC:~$ chmod o+t destination/
user1@PC:~$ umask 070
user1@PC:~$ touch source/file1
user1@PC:~$ echo "file1 of user1" > source/file1
user1@PC:~$ chgrp user3 source/
user1@PC:~$ chgrp -R user3 source/
user1@PC:~$ chown -R :user3 destination/
user1@PC:~$ su user2
Password:
user2@PC:/home/user1$ umask 077
user2@PC:/home/user1$ touch destination/file2
user2@PC:/home/user1$ echo "file2 of user2" > destination/file2
user2@PC:/home/user1$ su user3
Password:
user3@PC:/home/user1$ umask 700
user3@PC:/home/user1$ touch source/file3
user3@PC:/home/user1$ exit
exit
user2@PC:/home/user1$ exit
exit
user1@PC:~$ echo "file3 of user3" > source/file3
After executing Scenario A, answer the following questions:
Question:
Select the member of the group user1:
Scenario A
user1@PC:~$ ls -ld / /home/ .
drwxrwxr-x 11 user1 user1 4096 Jan 18 08:29 .
drwxr-xr-x 25 root root 4096 Nov 13 12:55 /
drwxr-xr-x 8 root root 4096 Jan 14 01:59 /home/
user1@PC:~$ umask
0002
user1@PC:~$ groups user1 user2 user3 root
user1 : user1 user3
user2 : user2 user1
user3 : user3 user2
root : root
user1@PC:~$ mkdir source destination
user1@PC:~$ chmod o+rwx destination/
user1@PC:~$ chmod g+rwx source/
user1@PC:~$ chmod o+t destination/
user1@PC:~$ umask 070
user1@PC:~$ touch source/file1
user1@PC:~$ echo "file1 of user1" > source/file1
user1@PC:~$ chgrp user3 source/
user1@PC:~$ chgrp -R user3 source/
user1@PC:~$ chown -R :user3 destination/
user1@PC:~$ su user2
Password:
user2@PC:/home/user1$ umask 077
user2@PC:/home/user1$ touch destination/file2
user2@PC:/home/user1$ echo "file2 of user2" > destination/file2
user2@PC:/home/user1$ su user3
Password:
user3@PC:/home/user1$ umask 700
user3@PC:/home/user1$ touch source/file3
user3@PC:/home/user1$ exit
exit
user2@PC:/home/user1$ exit
exit
user1@PC:~$ echo "file3 of user3" > source/file3
After executing Scenario A, answer the following questions:
Question:
Select the member of the group user3:
Scenario A
user1@PC:~$ ls -ld / /home/ .
drwxrwxr-x 11 user1 user1 4096 Jan 18 08:29 .
drwxr-xr-x 25 root root 4096 Nov 13 12:55 /
drwxr-xr-x 8 root root 4096 Jan 14 01:59 /home/
user1@PC:~$ umask
0002
user1@PC:~$ groups user1 user2 user3 root
user1 : user1 user3
user2 : user2 user1
user3 : user3 user2
root : root
user1@PC:~$ mkdir source destination
user1@PC:~$ chmod o+rwx destination/
user1@PC:~$ chmod g+rwx source/
user1@PC:~$ chmod o+t destination/
user1@PC:~$ umask 070
user1@PC:~$ touch source/file1
user1@PC:~$ echo "file1 of user1" > source/file1
user1@PC:~$ chgrp user3 source/
user1@PC:~$ chgrp -R user3 source/
user1@PC:~$ chown -R :user3 destination/
user1@PC:~$ su user2
Password:
user2@PC:/home/user1$ umask 077
user2@PC:/home/user1$ touch destination/file2
user2@PC:/home/user1$ echo "file2 of user2" > destination/file2
user2@PC:/home/user1$ su user3
Password:
user3@PC:/home/user1$ umask 700
user3@PC:/home/user1$ touch source/file3
user3@PC:/home/user1$ exit
exit
user2@PC:/home/user1$ exit
exit
user1@PC:~$ echo "file3 of user3" > source/file3
After executing Scenario A, answer the following questions:
Question:
Select the member of the group user2:
Scenario A
user1@PC:~$ ls -ld / /home/ .
drwxrwxr-x 11 user1 user1 4096 Jan 18 08:29 .
drwxr-xr-x 25 root root 4096 Nov 13 12:55 /
drwxr-xr-x 8 root root 4096 Jan 14 01:59 /home/
user1@PC:~$ umask
0002
user1@PC:~$ groups user1 user2 user3 root
user1 : user1 user3
user2 : user2 user1
user3 : user3 user2
root : root
user1@PC:~$ mkdir source destination
user1@PC:~$ chmod o+rwx destination/
user1@PC:~$ chmod g+rwx source/
user1@PC:~$ chmod o+t destination/
user1@PC:~$ umask 070
user1@PC:~$ touch source/file1
user1@PC:~$ echo "file1 of user1" > source/file1
user1@PC:~$ chgrp user3 source/
user1@PC:~$ chgrp -R user3 source/
user1@PC:~$ chown -R :user3 destination/
user1@PC:~$ su user2
Password:
user2@PC:/home/user1$ umask 077
user2@PC:/home/user1$ touch destination/file2
user2@PC:/home/user1$ echo "file2 of user2" > destination/file2
user2@PC:/home/user1$ su user3
Password:
user3@PC:/home/user1$ umask 700
user3@PC:/home/user1$ touch source/file3
user3@PC:/home/user1$ exit
exit
user2@PC:/home/user1$ exit
exit
user1@PC:~$ echo "file3 of user3" > source/file3
After executing Scenario A, answer the following questions:
Question:
Select who can read file1:
Scenario A
user1@PC:~$ ls -ld / /home/ .
drwxrwxr-x 11 user1 user1 4096 Jan 18 08:29 .
drwxr-xr-x 25 root root 4096 Nov 13 12:55 /
drwxr-xr-x 8 root root 4096 Jan 14 01:59 /home/
user1@PC:~$ umask
0002
user1@PC:~$ groups user1 user2 user3 root
user1 : user1 user3
user2 : user2 user1
user3 : user3 user2
root : root
user1@PC:~$ mkdir source destination
user1@PC:~$ chmod o+rwx destination/
user1@PC:~$ chmod g+rwx source/
user1@PC:~$ chmod o+t destination/
user1@PC:~$ umask 070
user1@PC:~$ touch source/file1
user1@PC:~$ echo "file1 of user1" > source/file1
user1@PC:~$ chgrp user3 source/
user1@PC:~$ chgrp -R user3 source/
user1@PC:~$ chown -R :user3 destination/
user1@PC:~$ su user2
Password:
user2@PC:/home/user1$ umask 077
user2@PC:/home/user1$ touch destination/file2
user2@PC:/home/user1$ echo "file2 of user2" > destination/file2
user2@PC:/home/user1$ su user3
Password:
user3@PC:/home/user1$ umask 700
user3@PC:/home/user1$ touch source/file3
user3@PC:/home/user1$ exit
exit
user2@PC:/home/user1$ exit
exit
user1@PC:~$ echo "file3 of user3" > source/file3
After executing Scenario A, answer the following questions:
Question:
Select who can modify file1:
Analyze the following scenario and answer the questions.
user1@PC:~$ ls -F /home/user*
/home/user1:
file 'Free palestine' Palestine/ script2 Videos/
/home/user2:
Free/ palestine/ Palestine
/home/user3:
'Free palestine'
/home/user4:
'Free palestine' Palestine/
user1@PC:~$ cat -n Free\ palestine
1
2 Free palestine
user1@PC:~$ cat -n /home/user3/Free\ palestine
user1@PC:~$ cat -n /home/user4/Free\ palestine
1 Free palestine
user1@PC:~$ cat script2
for i in `seq 1 4`
do
note=0
Usr="user$i"
obj1="/home/$Usr/Desktop/`whoami`/Palestine"
obj2="/home/$Usr/Desktop/`whoami`/Free palestine"
if [ -d "$obj1" ]
then
let note=$note+1
fi
if [ -f "$obj2" ]
then
let note=$note+1
l=`grep -n ^"Free palestine" "$obj2" | cut -d":" -f1`
if [ "$l" = "2" ]
then
let note=$note+1
fi
fi
echo "The grade of $Usr is ${note}/3"
done
Question:
Select the correct result after executing script 2. The grade of user3 is:
Analyze the following scenario and answer the questions.
user1@PC:~$ ls -F /home/user*
/home/user1:
file 'Free palestine' Palestine/ script2 Videos/
/home/user2:
Free/ palestine/ Palestine
/home/user3:
'Free palestine'
/home/user4:
'Free palestine' Palestine/
user1@PC:~$ cat -n Free\ palestine
1
2 Free palestine
user1@PC:~$ cat -n /home/user3/Free\ palestine
user1@PC:~$ cat -n /home/user4/Free\ palestine
1 Free palestine
user1@PC:~$ cat script2
for i in `seq 1 4`
do
note=0
Usr="user$i"
obj1="/home/$Usr/Desktop/`whoami`/Palestine"
obj2="/home/$Usr/Desktop/`whoami`/Free palestine"
if [ -d "$obj1" ]
then
let note=$note+1
fi
if [ -f "$obj2" ]
then
let note=$note+1
l=`grep -n ^"Free palestine" "$obj2" | cut -d":" -f1`
if [ "$l" = "2" ]
then
let note=$note+1
fi
fi
echo "The grade of $Usr is ${note}/3"
done
Question:
Select the correct result after executing script 2. The grade of user2 is:
Analyze the following scenario and answer the questions.
user1@PC:~$ ls -F /home/user*
/home/user1:
file 'Free palestine' Palestine/ script2 Videos/
/home/user2:
Free/ palestine/ Palestine
/home/user3:
'Free palestine'
/home/user4:
'Free palestine' Palestine/
user1@PC:~$ cat -n Free\ palestine
1
2 Free palestine
user1@PC:~$ cat -n /home/user3/Free\ palestine
user1@PC:~$ cat -n /home/user4/Free\ palestine
1 Free palestine
user1@PC:~$ cat script2
for i in `seq 1 4`
do
note=0
Usr="user$i"
obj1="/home/$Usr/Desktop/`whoami`/Palestine"
obj2="/home/$Usr/Desktop/`whoami`/Free palestine"
if [ -d "$obj1" ]
then
let note=$note+1
fi
if [ -f "$obj2" ]
then
let note=$note+1
l=`grep -n ^"Free palestine" "$obj2" | cut -d":" -f1`
if [ "$l" = "2" ]
then
let note=$note+1
fi
fi
echo "The grade of $Usr is ${note}/3"
done
Question:
Select the correct result after executing script 2. The grade of user4 is:
Question:
Analyze the following scenario and answer the question.
user1@PC:~$ crontab -l
0 0 * * 1,3,4 bash script2
Based on the scenario, we can conclude that:
Script Description:
The following script moves files from ~/Desktop to ~/Files and directories from ~/Desktop to ~/Directories, renaming them in the format username_original-name.
user1@PC:~$ nl script
1 if test -e ~/Files/
2 then
3 mkdir ~/Files/
4 fi
5 if [ ! -e ~/Directories/ ]
6 then
7 mkdir ~/Directories/
8 fi
9 usr="whoami"
10 cd ~/Desktop/
11 WD=`pwd`
12 if [ "$WD"= ~/Desktop ]
13 then
14 for obj in *
15 do
16 if [ "$obj" -f ]
17 then
18 mv "$obj" ~/Files/"$usr"_"$obj"
19 fi
20 else
21 then
22 if test -d "$obj"
23 then
24 mv "$obj" ~/Directories/"$usr"_"$obj"
25 fi fi
26 od
27 fi
Question :
Identify the lines that contain any errors (logical or syntactical) from lines 21 to 27.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!