ITI
ITI SATs
ITI SATs
Set of flashcards Details
Flashcards | 122 |
---|---|
Language | English |
Category | Computer Science |
Level | University |
Created / Updated | 13.05.2017 / 28.06.2017 |
Weblink |
https://card2brain.ch/box/20170513_iti
|
Embed |
<iframe src="https://card2brain.ch/box/20170513_iti/embed" width="780" height="150" scrolling="no" frameborder="0"></iframe>
|
You enter the following command at the shell prompt:
seq 662 695 | grep 693 || echo 989
What is shown in the output?
Working with the bash, you issue the command: "chmod 376 file1". What are the resulting file permissions of file1?
Working with the bash, you want to show the content of files. Which command do you use?
Consider the following shell script named ”myscript”:
#!/bin/bash
case "$1" in
ls|rm)
$1 "$0"
;;
cp|mv)
"$1" "$0" "$2"
;;
echo|mkdir)
"$2" "$0" "$1"
;;
*)
"$0" ls
;;
esac
The current directory just contains the file ”myscript”. Now, the script is called like:
./myscript mkdir cp
When the script is finished, what has happend in the current directory?
Consider the following shell script named ”myscript”:
#!/bin/bash
case "$1" in
ls|rm)
$1 "$0"
;;
cp|mv)
"$1" "$0" "$2"
;;
echo|mkdir)
"$2" "$0" "$1"
;;
*)
"$0" ls
;;
esac
The current directory just contains the file ”myscript”. Now, the script is called like:
./myscript mkdir cp
What is written to STDOUT/STDERR during execution of the script?
Working with the bash, the current directory contains 5 files:
f12 f65 f66179 f9 f96581
How many files are listed for each of the following commands?
ls *?*?
5
Working with the bash, the current directory contains 5 files:
f12 f65 f66179 f9 f96581
How many files are listed for each of the following commands?
ls *?[2]
1
Working with the bash, the current directory contains 5 files:
f12 f65 f66179 f9 f96581
How many files are listed for each of the following commands?
ls ?
0
The file data.csv contains 10 comma-separated values per line, i.e. 10 columns like:
column 1,column 2,column 3,column 4,column 5,column 6,column 7,column 8,column 9,column 10
The following command is issued at the shell prompt:
sed -r 's/([^,]*),([^,]*),[^,]*,([^,]*),[^,]*,[^,]*,([^,]*)$/\1/' < data.csv
Which columns do match the regular expression?
The file data.csv contains 10 comma-separated values per line, i.e. 10 columns like:
column 1,column 2,column 3,column 4,column 5,column 6,column 7,column 8,column 9,column 10
The following command is issued at the shell prompt:
sed -r 's/([^,]*),([^,]*),[^,]*,([^,]*),[^,]*,[^,]*,([^,]*)$/\1/' < data.csv
Which columns are shown in the output?
Working with the bash, the command ls -l shows the following output:
-rwxrwx--- 10 q s 7239 2011-01-01 00:01 n
Does this listing show a file or a directory?
Working with the bash, the command ls -l shows the following output:
-rwxrwx--- 10 q s 7239 2011-01-01 00:01 n
Which user is the owner of the file/directory? (user name)
q
Working with the bash, the command ls -l shows the following output:
-rwxrwx--- 10 q s 7239 2011-01-01 00:01 n
Which group is associated with the file/directory? (group name)
s
Working with the bash, the command ls -l shows the following output:
-rwxrwx--- 10 q s 7239 2011-01-01 00:01 n
What is the name of the file/directory? (file/directory name)
n
Working with the bash, the command ls -l shows the following output:
-rwxrwx--- 10 q s 7239 2011-01-01 00:01 n
Does the owner have execute permissions?
Working with the bash, the command ls -l shows the following output:
-rwxrwx--- 10 q s 7239 2011-01-01 00:01 n
What is the size of the file/directory?
7239
Consider the following shell script named ”myscript”:
#!/bin/bash
V="$1"
if [ $1 -lt 655 ]; then
echo $((V + 2))
else
echo "`ls`"
fi
The current directory just contains the file ”myscript”. What is shown in the output when the script is called like:
./myscript 577
579
You enter the following command at the shell prompt:
seq 207 431 | grep 760 && echo 896
What is shown in the output?
Working with the bash, the shell variable v has been set to 173 (i.e., v=173). What is the output of the following commands?
echo "$v"
173
Working with the bash, the shell variable v has been set to 173 (i.e., v=173). What is the output of the following commands?
echo "\$v"
$v
Working with the bash, the shell variable v has been set to 173 (i.e., v=173). What is the output of the following commands?
echo $v
173
The size of a hard disk is specified by CHS=23246/14/61. The sector size is 512 bytes. What is the total size of the hard disk in bytes (numeric)?
10164267008
Consider the typical root file system for GNU/Linux systems. Which statements apply?
Which are standard Linux file systems (including virtual file systems)?
Consider the MBR partitioning scheme. Which combinations of primary (P), extended (E), and logical (L) partitions are possible?
The following commands are successfully executed in the given order
mount /dev/sdc6 /mnt
mount /dev/sdc2 /mnt/mnt
mount /dev/sdc3 /mnt/mnt/mnt
Now, a file is copied to the directory /mnt. To which partition has the file been copied?
The following commands are successfully executed in the given order
mount /dev/sdc6 /mnt
mount /dev/sdc2 /mnt/mnt
mount /dev/sdc3 /mnt/mnt/mnt
Which directory exists for sure on partition /dev/sdc6?
The following commands are successfully executed in the given order
mount /dev/sdc6 /mnt
mount /dev/sdc2 /mnt/mnt
mount /dev/sdc3 /mnt/mnt/mnt
Which program is used to unmount file systems? (Answer - single word, no path)
umount
A new hard disk (no high-level formatting) shows up in the system as /dev/sdd. After a GPT has been setup, the following command is executed successfully:
i=9; for j in 800 200 200 500 600; do parted /dev/sdd mkpart p$i $i $((i+j*10)); i=$((i+j*10)); done
Hint: For parted, the syntax of the sub-command mkpart is given by
mkpart PART-NAME START END
where PART-NAME is the name of the partition, and START/END give the start/end of the partition in MB.
How many partitions have been created?
5
A new hard disk (no high-level formatting) shows up in the system as /dev/sdd. After a GPT has been setup, the following command is executed successfully:
i=9; for j in 800 200 200 500 600; do parted /dev/sdd mkpart p$i $i $((i+j*10)); i=$((i+j*10)); done
Hint: For parted, the syntax of the sub-command mkpart is given by
mkpart PART-NAME START END
where PART-NAME is the name of the partition, and START/END give the start/end of the partition in MB.
Considering all calls to mkpart, what is the maximum difference between END and START (which is approximately the size of the largest partition in MB)?
8000
A new hard disk (no high-level formatting) shows up in the system as /dev/sdd. After a GPT has been setup, the following command is executed successfully:
i=9; for j in 800 200 200 500 600; do parted /dev/sdd mkpart p$i $i $((i+j*10)); i=$((i+j*10)); done
Hint: For parted, the syntax of the sub-command mkpart is given by
mkpart PART-NAME START END
where PART-NAME is the name of the partition, and START/END give the start/end of the partition in MB.
After the command has been finished, what is the value of the shell variable i?
23009
A new hard disk (no high-level formatting) shows up in the system as /dev/sdd. After a GPT has been setup, the following command is executed successfully:
i=9; for j in 800 200 200 500 600; do parted /dev/sdd mkpart p$i $i $((i+j*10)); i=$((i+j*10)); done
Hint: For parted, the syntax of the sub-command mkpart is given by
mkpart PART-NAME START END
where PART-NAME is the name of the partition, and START/END give the start/end of the partition in MB.
Which of the following files represents one of the created partitions?
A new hard disk (no high-level formatting) shows up in the system as /dev/sdd. After a GPT has been setup, the following command is executed successfully:
i=9; for j in 800 200 200 500 600; do parted /dev/sdd mkpart p$i $i $((i+j*10)); i=$((i+j*10)); done
Hint: For parted, the syntax of the sub-command mkpart is given by
mkpart PART-NAME START END
where PART-NAME is the name of the partition, and START/END give the start/end of the partition in MB.
Now that the partitions have been created, which command to execute next?
Consider the GPT partitioning scheme. Which statements are true?
Comparing the PC-BIOS and UEFI, which statements are true?
Which protocols are Application Layer protocols?
Which statements apply to broadcast networks?
Which statements apply to the layers of the TCP/IP model?
Which protocols are Transport Layer protocols?
In the context of layer models, which statements apply to protocols?