-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
Submodule a1
deleted from
5e6d5c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
1) Make a directory a1 under your home directory. | ||
/mnt/scratch/apple23fa/cs131/a1 | ||
|
||
2) What is your home directory path? How did you find out? | ||
/mnt/scratch/apple23fa | ||
I used the command echo $HOME to find out | ||
|
||
3) What is your UID? To what group(s) do you belong? HOw did you find out? | ||
apple23fa:x:1018:1018::/mnt/scratch/apple23fa:/bin/bash | ||
apple23fa:x:1018: | ||
My UID is 1018 in the third field and my group ID is 1018 in the fourth field. | ||
I belong to group apple23fa. | ||
I used the command cat /etc/passwd and cat /etc/group | ||
|
||
4) Create a new directory "temp". Remove execute permisision for yourself. From this temp directory, are you allowed to cd in that directoy? Can you "ls -l" it? Can you create files under it? | ||
|
||
/mnt/scratch/apple23fa/cs131/a1/temp | ||
|
||
I removed execute permission for myself using this command: chmod 666 temp | ||
|
||
I am not allowed to cd in that directory. | ||
bash: cd: temp: Permission denied | ||
|
||
I can ls -l it. | ||
total 8 | ||
-rw-rw-r-- 1 apple23fa apple23fa 1641 Sep 13 02:14 a1.txt | ||
drw-rw-rw- 2 apple23fa apple23fa 4096 Sep 13 01:54 temp | ||
|
||
I cannot create files under it. | ||
mv: cannot stat 'temp/a.txt': Permission denied | ||
|
||
5) Create a new directory "temp2". Are you allowed to "mv" the directory to "temp3"? Are you allowed to "cp" a directoy? If you want to cp an entire directory, how would you do it? | ||
I am allowed to mv temp2 to temp3 but I am not allowed to cp temp 2 to temp3. | ||
cp: -r not specified; omitting directory 'temp2' | ||
So I used cp -r temp2 temp3 to cp the whole directory. | ||
|
||
6) Using only "ls" (and maybe grep) can you find out which file under directory/proc/contains information about memory (mem) on your server? which file contains informations about the cpu's on your server? | ||
I can use the command ls /proc to find out the files meminfo anf cpuinfo. | ||
|
||
7) Use head to check the memory information file you found above. How much total memory is on your server? | ||
MemTotal: 73080512 kB | ||
|
||
8) Then use head, tail, cat to check the cpu information file you found above. How many processors are on your server? What is the processor architecture name? What is the processor speed in GHz? | ||
There are 256 processors. The processor architecture name is POWER8. the processor speed is 3.425 GHz. | ||
|
||
processor : 0 | ||
cpu : POWER8 (architected), altivec supported | ||
clock : 3425.000000MHz | ||
revision : 2.1 (pvr 004b 0201) | ||
|
||
processor : 255 | ||
cpu : POWER8 (architected), altivec supported | ||
clock : 3425.000000MHz | ||
revision : 2.1 (pvr 004b 0201) | ||
|
||
9)Identify the operating system version. Which file under /etc/ contains this information? | ||
VERSION_ID="8.6" | ||
It can be found under /etc/os-release | ||
|
||
10) What is the permission (given to all users) for the file containing the OS version information? | ||
lrwxrwxrwx. 1 root root 22 Apr 6 2022 /etc/os-release -> ..//usr/lib/os-release | ||
All users do not have permission to read, write or execute except the root owner. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
588 mkdir a1 | ||
589 ls | ||
590 mv a1 cs131 | ||
592 vim a1.txt > a1 | ||
593 echo $HOME | ||
594 cat /etc/passwd | ||
595 cat /etc/group | ||
596 mkdir temp | ||
597 chmod 666 temp | ||
598 ls | ||
599 ls -l | ||
600 touch a.txt | ||
602 a.txt > temp | ||
603 mv a.txt temp | ||
604 cd temp | ||
605 vim a1.txt | ||
606 mkdir temp2 | ||
609 mkdir temp3 | ||
616 mv temp2 temp3 | ||
620 cp temp2 temp3 | ||
644 cp -r temp2 temp3 | ||
653 ls /proc | ||
655 cat /proc/meminfo | ||
658 cat /proc/cpuinfo | ||
663 head /proc/meminfo | ||
665 head /proc/cpuinfo | ||
666 tail /proc/cpuinfo | ||
667 cat /proc/cpuinfo | ||
669 cat /etc/os-release | ||
671 ls -l /etc/os-release | ||
672 vim a1.txt | ||
673 history > cmds.log |