1510-midterm study

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Any one character

". " is used to match Any number of characters Any one character Only " . " Only special characters

adduser joe

A new employee has come into the company, how do I set up an account for him using one command? adduser joe newusers joe makeuser joe useradd joe

False

A solid state disk that can transfer data a 500MBps is a good match for a SATA II controller True False

PATH=$PATH:~

A student complains that the script won't run. How would you fix this error? There is not enough information to answer this question PATH=$PATH:~ This error can not be fixed by student chmod 777 guess.sh

/var/spool/cron/crontabs

A technician needs to make a list of all scheduled tasks for all users where is the information located? /var/spool/cron/crontabs /etc/cron.d /scheduler /etc/crontab

sudo nano /etc/rsyslog.d/logging.conf

A technician notices the following line in a logging script: logger -p local0.err "diskusage: Directory $1 not found" To change where this is being logged so the log messages can be easily found what command should be run? sudo logger --configure sudo restore -if local0.err sudo syslog --configure sudo nano /etc/rsyslog.d/logging.conf

| uniq -c

A user needs to count the different permission types. The command so far looks like: ls -l| cut -c1-10|sort What needs to be added to the end to count the different permission types: | wc -c | uniq -c | wc -l | wc -w

george

After the following commands are executed who is the owner of the file myfile.txt? su sam tar -cvf \var\log\myfile.tar myfile.txt su george tar -xvf \var\log\myfile.tar root george sam impossible to determine

/dev

An interface to system devices that are represented as files in the file system (called 'device files') is found in which of the following directories? /bin /dev /proc /mount

getfacl

Doing a listing of file A I get the following permissions: -rw-rw-r--+ Which command would help me see what additional permission are indicated by the + getfacl chmod setfacl chattr

files

Give an example of storage content? journaling processes directories files

25

Given the above output for the df command what will the following line do? df -h | awk '{print $5}' | grep % | grep -v Use | sort -n | tail -1 | cut -d "%" -f1 581 25 636 19

cat foo.log|grep wordpress|tail -5

Given the log file foo.log Which command will list the most recent 5 lines that contain the word wordpress in them. cat foo.log|grep wordpress|head -5 cat foo.log|grep wordpress|tail -5 cat foo.log|head -5|grep wordpress cat foo.log|tail -5|grep wordpress

df -a

How do I get : write a bash script showdisk cat /proc/partitions df -a

6

How many fields are in a syntactically correct line of /etc/fstab? 3 7 6 4 5

4

How many terminal windows will be opened by this script? i="0"while [ $i -lt 4 ]doxterm &i=$[$i+1]done impossible to determine 4 5 3

/dev

I have plugged in new scsi drives into the computer. Where would I look for the hardware manager to see if Linux recognized the drives? /dev /drivers /hardware /proc

GPT

I just bought a 5.2 TB hard-drive how should I partition it? GPT doesn't matter DOS solaris

vipw -s

I need to edit the shadow file which commands should I use vipw -shadow vipw -s nano passwd sudo passwd

cat syslog|tail -1

I need to see the last thing logged before the system crashed. What command would I use with the syslog file to see the last entry? cat syslog|tail +1 cat syslog|head -1 cat syslog|tail -1 cat syslog|last -1

chmod u+r,g+x filename

I want to have the user able to read the filename and the group access to execute the file, what command should I use chmod u-x,g-r chmod 444 filename chmod u+r,g+x filename chmod 777 filename

no match

If I have the following program: a=5 b=6 if [ "$a" -ne "$b" ] then echo no match fi What will appear on the screen? syntax error permission denied error no match nothing

5

If I have the following script: #!/bin/bash x=1 while [ $x -le 5 ] do echo "Welcome $x times" x=$(( $x + 1 )) doneHow many times will I be welcomed? 6 5 3 1

cmd &> file

In trouble shooting the cmd command which symbols would be used to send the error and the outputs to a file? cmd 1> file cmd &> file cmd | file cmd >> file

LABEL UUID

Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose TWO correct answers.) UUID FIND NAME LABEL ID

A process is an abstraction used by UNIX and Linux to represent a running program.

Is a process a program? All programs are processes A process is a file A process requires a file A process is an abstraction used by UNIX and Linux to represent a running program.

All are correct

Log files are useful for which of the following tasks? All are correct Monitoring the progress of applications Debugging or troubleshooting problems Reviewing when users access a system

top

My programs are running very slowly what command could I use to figure out why? taskmanager top cat /proc/partitions head -3

False

RAID 0 provides fault tolerance such that if one drive fails the other will contain the data True False

chmod

Scripts are made executable using the command run chmod chown exe

last

Someone mentioned that the wtmp file has user logins.. How do I see this file? nano wtmp last view wmtp cat wtmp

chgrp admin adminSetup; chmod g+xwr

The admin group needs to be able to execute and change the adminSetup script. Which commands would work to do this chgrp admin adminSetup; chmod 456 chgrp admin adminSetup; chmod 666 chgrp adminSetup admin; chmod g+xwr chgrp admin adminSetup; chmod g+xwr

Numbers

The comparison operator " -eq " is used for Numbers Strings Characters Any kind of data

telinit 1

The following has appeared on my screen, what did I do? telinit 1 telinit 2 telinit 6 telinit 0

To hold the encrypted user passwords

The purpose of the /etc/shadow file is To shadow the use of the sudo command To hold the encrypted user passwords To serve as a backup of the fstab file To serve as a backup of the user database.

sudo passwd jane

To change the password on an account named jane an administrator (not jane) must use which of the following commands? All are correct sudo passwd jane sudo su jane sudo login jane

df -h

What command should I use to see if there is sufficient space for log files? df -h dskspace ls ps -aux

ps

What command will list the processes that are running, by default it just shows the PID, Terminal, Time and process name? proc kill -l process ps

kill -stop 1031

What command would I use to stop a process? kill me please kill -stop 1031 stop 1031 kill -stop myprocess

ls -a

What command would produce this output? . .gksu.lock .pulse.. .gnome2 .pulse-cookie.bash_history .gnome2_private secret.bash_logout .gstreamer-0.10 Templates.bashrc .gtk-bookmarks testbin .gvfs The secret voice in your head.mp3.cache .ICEauthority .thumbnails.config .local varlogoutfile.txt.dbus .mission-control VideosDesktop .mozilla vmware-tools-distribDocuments Music .xsession-errorsDownloads Pictures .xsession-errors.old.fontconfig .profile cd -a ls -l ls -a cd -l

mount and umount

What commands do you use to mount/unmount filesystems to a mount point? mount and umount mount and dismount mount and unmount Just use mount for both

17 3 1 1-12/3 * reports

What crontab entry would run the command reports at the end of each quarter? 0 1 1,4,8,12 4 * reports 17 3 1 1-12/3 * reports 0 1 1-12 4 * reports 17 3 4 1-12 7 reports

Convert the text language into a machine code before running it.

What does it mean to compile a language? build it from the ground up Place it into a dictionary Convert the text language into a machine code before running it. Put it together from scratch

This shell script executes the logrotate command writing errors to syslog

What does the following script do? This shell script changes the logrotate configuration files This shell script executes the logrotate command writing errors to syslog This shell script executes the logger and logrotate commands each time it is run. This shell script crashes with an error message

chooses the bash interpreter

What does the shebang #!/bin/bash do? uses a Bourne shell to execute the scrip starts every executable script chooses the bash interpreter nothing as it is commented out

The password becomes invalid which disables password based logins although other login methods remain usable.

What happens if the password of a user in the /etc/shadow file is prepended with the ! character? The user is disabled and all login methods, including but not limited to password based logins, are disabled. Upon the next log in, the user is forced to change his password. The password is inverted which allows the user to log in with any password other than the current password. When logging in, the user automatically gets root privileges in addition to his regular privileges. The password becomes invalid which disables password based logins although other login methods remain usable.

Latest linux filesystem type

What is ext4 4 digit extension used in linux files Latest linux filesystem type An extended file system used to work with windows files An external file system

1

What is the PID of the init process? Can be any number between 1 and 10 1 depends on the boot 2

chfn

What is the command to change GECOS information? chfn chGECOS sudo passwd chpw

/mnt

What is the common mount point? /dev /mnt /storage /etc

bash

What is the default shell in linux for normal users? csh powershell bash usershell

init

What is the first process started that runs the startup scripts? startup kernel init start

It is a distribution neutral description of locations of files and directories.

What is the purpose of the Filesystem Hierarchy Standard? It is a distribution neutral description of locations of files and directories. It provides unified tools to create, maintain and manage multiple filesystems in a common way. It defines a common internal structure of inodes for all compliant filesystems. It is a security model used to ensure files are organized according to their permissions and accessibility.

The user bob's home directory is removed. The user bob is removed from the system's user database.

What is true regarding the command userdel --force --remove bob? (Choose TWO correct answers.) All files owned by bob are remove from all mounted filesystems. The locate database is updated to drop files owned by bob. The user bob's home directory is removed. The user bob is removed from the system's user database. In case bob was the last member of a group, that group is deleted.

the vfat filesystem driver

What system driver is usally used on linux to interpret FAT filesystems? the vfat filesystem driver simple filesystem driver New Technology File System driver for linux File allocation table driver

Your name is $name

What will be the output on the screen when the following lines are run: name='Jane'echo 'Your name is $name' Your name is Jane Syntax error Your name is Your name is $name

generate a number between 1 and 10

What will the following command do? echo $[1+ $[ RANDOM %10]] syntax error generate a number between 0 and 9 generate a number between 1 and 10 permission denied error

read the first 10 lines from file8 and copy them to file9

What will the following command do? head < file8 > file9 show the first 10 lines of file 9 read the first 10 lines from file8 and copy them to file9 read the first 10 lines from file9 and copy them to file8 error with no such command file8

10

When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process? 0 20 -10 10

/etc/init.d

Where are the run level directories located? /init /etc/init.d /etc/runlevels /startup

/etc/fstab

Where do need to go to make a partition automatically mount on booting mount point /dev/filesystem /dev/mount /etc/fstab

RAID 5

Which RAID level has the following characteristics?Minimum 3 disks.Good performance ( as blocks are striped ).Good redundancy ( distributed parity ).Best cost effective option providing both performance and redundancy. Use this for DB that is heavily read oriented. Write operations will be slow. RAID 0 RAID 1 RAID 5 RAID 10

RAID 5

Which RAID level would you use if you wanted to increase reliability and minimize the incremental cost for the reliability. RAID is not appropriate in that circumstance RAID 1 RAID 5 RAID 0

env

Which command allows me to see all the preloaded bash variables? showvar grep preload env

nice -19 cc

Which command sets a process named cc with a PID of 2555 to the lowest priority nice --19 2555 nice -19 cc nice -n -20 cc nice -19 2555

strace -p 2555

Which command will show the live signals, system calls, return values for a program named cc with a PID of 2555 tracelive -2555 strace -p 2555 strace cc strace -l cc

chage usermod passwd

Which commands can be used to change a user's account aging information? (Choose THREE correct answers.) chsh chage usermod chattr passwd

30 08 10 06 * /bin/full-backup.sh

Which entry will execute the Full backup shell script (full-backup) on 10th June 08:30 AM none of the other entries 30 20 06 08 * /bin/full-backup.sh 30 08 10 06 * /bin/full-backup.sh 10 06 08 30 * /bin/full-backup.sh

ext4

Which file system would Linux likely use for the root filesystem? vfat joliet ext4 ntfs

passwd, shadow, group, gshadow, /home/barack

Which files are affected by the command: sudo adduser barack obama does not impact any files just adds user passwd, shadow, group, gshadow, /home/barack shadow and passwd files just the passwd file

Sun XTA-SC1NC-14615K 146Gb 15K rpm U320 disk 540-6494

Which hard drive would likely cost the most? Sun XTA-SC1NC-14615K 146Gb 15K rpm U320 disk 540-6494 Seagate Momentus 5400.6 320GB 5400 RPM 8MBCache SATA3.0Gb/s 2.5" Int. Notebook Western Digital WD2500LPVT 250GB 2.5" SATA 3.0Gb/s 7.0mm Hard Drive Seagate Hybrid Drives ST500LM000 500GB MLC/8GB 64MB Cache SATA 6.0Gb/s NCQ 2.5" Laptop SSHD -Bare Drive

Reading of the boot loader from the master boot record.

Which is the first step that is taken when booting a system? Execution of system startup scripts. Reading of the boot loader from the master boot record. Device detection and configuration. Loading and initialization of the kernel.

A process can be given a lower priority Killing a process by its PID

Which of the following actions can be run from the top command? (Choose two.) Measure the free space on the hard drive Killing a process by its PID New processes can be started Reboot the system A process can be given a lower priority

last

Which of the following commands reads the wtmp file and reports a record of user login times, user logout times, and system reboots? syslog dmesg lastlog last

logger "The backup was successful."

Which of the following commands will add the message (in double quotes) to the system log file? log "The backup was successful." logger "The backup was successful." syslog "The backup was successful." echo syslog -p "The backup was successful."

mount /dev/sdb2 /mnt/data

Which of the following commands will make the second partition of the hard disk described by the device file /dev/sdb an accessible file system at the directory /mnt/data ? mount /dev/sdb1 /mnt/data mount /dev/sdb2 /mnt/data mount /mnt/data /dev/sdb2 mount -f /dev/sdb1 /mnt/data

echo $foo

Which of the following commands would allow you to write the contents of the variable foo to your console? echo foo out $foo out foo echo $foo

Files and directories owned by the user are deleted

Which of the following does NOT happen when a user account is removed from the system? The user account can no longer login. The user account data is removed from the /etc/passwd file. Files and directories owned by the user are deleted. The user account is removed from any groups to which it belongs.

lrwxrwxrwx

Which of the following file permissions belong to a symbolic link? lrwxrwxrwx +rwxrwxrwx srwxrwxrwx -rwxrwxrwx

SCSI

Which of the following is not a common serial storage bus type: SATA USB SCSI IEEE 1394 (firewire)

Executing

Which of the following is not a process state? Executing Sleeping Runnable Stopped Zombie

A disk drive

Which of the following is not an essential part of a file system? A security model A disk drive An API A namespace

systemd.unit=rescue.target

Which of the following options for the kernel's command line changes the systemd boot target to rescue.target instead of the default target? systemd.unit=rescue.target systemd.target=rescue.target systemd.service=rescue.target systemd.default=rescue.target systemd.runlevel=rescue.target

fdisk

Which of the following programs can be used to create partitions on a hard disk? /proc/partitions blkid fdisk mkfs

0027

Which of the following settings for umask ensures that new files have the default permissions -rw-r----- ? 0640 0038 0027 0017

passwd file

Which of the following will not provide single sign-on services? passwd file Open LDAP Netware Directory Services Active Directory

All the other answers listed here and more

Which of the following would you expect to find in a linux/unix filesystem All the other answers listed here and more An API A security model An implementation

All the other answers listed here and more

Which of the following would you expect to find in a linux/unix filesystem An API All the other answers listed here and more An implementation A security model

echo `ls`

Which of these commands will give me the directory listed with no newlines? echo `ls` echo 'ls' echo "ls" echo ls

/etc/rc.sysinit is run - don't change this as patches may overwrite it.

Which of these startup steps is out of order? -The bootloader finishes it's thing -/etc/inittab is consulted to see what runlevel the system should be put into, and any commands for that runlevel are run. see man inittab if you're curious about this file. -/etc/rc?.d (where ? = runlevel) S* scripts are run -/etc/rc.local is run -/etc/rc.sysinit is run - don't change this as patches may overwrite it.

d. rescan-scsi-bus, cfdisk /dev/sdd, mkfs.ext4 /dev/sdd1, mkdir /mnt/storage1, mount /dev/sdd1 /mnt/storage1

Which order would best work for these commands? a. rescan-scsi-bus, mkfs.ext4 /dev/sdd1, cfdisk /dev/sdd, mkdir /mnt/storage1, mount /dev/sdd1 /mnt/storage1 b. cfdisk /dev/sdd, rescan-scsi-bus, mkfs.ext4 /dev/sdd1, mkdir /mnt/storage1, mount /dev/sdd1 /mnt/storage1 c. rescan-scsi-bus, mount /dev/sdd1 /mnt/storage1, cfdisk /dev/sdd, mkfs.ext4 /dev/sdd1, mkdir /mnt/storage1 d. rescan-scsi-bus, cfdisk /dev/sdd, mkfs.ext4 /dev/sdd1, mkdir /mnt/storage1, mount /dev/sdd1 /mnt/storage1

passwords must be longer than 8 characters

Which rule would help the most for keeping passwords secure? passwords must be longer than 8 characters paswords must include at least 1 number password must not include the user name password must include a symbol

RAID 5

Which type of RAID is this? RAID 10 RAID 1 RAID 5 RAID 2

ext2

Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters? ext3 ext4 VFAT XFS ext2

--x-----x

chmod 101 myfile will result in which permissions being set? rwx------ rwx-----x --x-----x r--------

echo $?

student@debian:~$ a=5student@debian:~$ b=10student@debian:~$ test $a -gt $b How do I see the results of the test? result echo $RESULT You have to include an if statement to see the results echo $?

List all devices mounted including virtual filesystems like proc.

what does just issuing mount by itself do. Show spaces allocated on disks Show the man page for mount List all devices mounted including virtual filesystems like proc. check and repair Linux file systems.

this shell script executes the logrotate command everyday

what does the following script do: $ cat /etc/cron.daily/logrotate #!/bin/sh /usr/sbin/logrotate /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0 it is impossible to determine crashes with an permissions denied error message updates the syslog file each time it is run this shell script executes the logrotate command everyday

K06rpcbind

what file is run last if I am at runlevel 2 and I telinit 1? S21single s01killprocs K06rpcbind K01saned

hash codes

what is hidden in /etc/shadow decriptors passwords hash codes system files


Ensembles d'études connexes

Respiratory - Hinkle Prep U questions

View Set

Livestock Breeding Systems Test Answers Animal Science

View Set

Simulacro examen final ABA Esapaña

View Set

Finding a Rule for Dividing Fractions (Quiz)

View Set

unit 9 talented people live upper-intermediate

View Set

charles lindbergh reading - h. us history

View Set

302 Hinkle Chapter 22: Management of Patients with Upper Respiratory Tract Disorders PrepU

View Set

New Issues: U.S. Government and Agency Underwritings

View Set