Elance Linux Test Answers 2015
·
What is the linux mascot?
Hat
Gecko
Elephant
Penguin
How do you show all processes being run by a
particular user?
cat /home/USERNAME/open.process
top --USERNAME
cat /etc/activeprocess | grep USERNAME
netstat -u USERNAME
top -U [USERNAME]
What does GRUB stand for?
Grand Unified Bootloader
Grand Unification Bootloader
Great Unique Bootloader
Gum Removal Under Boot
Great Ultimate Bootloader
GRUB stands for _____.
Grand Unified Boot Loader
Gentoo's Regular Booter
Great Unix Boot Loader
GNU Released Unix Booter
mount -a' will load all filesystems listed in:
/etc/mtab
/etc/filesystems
/etc/fstab
/etc/fs.conf
What is GNOME ?
A computer software system and network protocol
that provides a basis for graphical user interfaces (GUIs) and rich input device
capability for networked computers.
A desktop environment and graphical user interface
that runs on top of a computer operating system.
A linux distribution
Ubuntu is based on...
Fedora
Slackware
Debian
None of these
Gentoo
How do you activate the noclobber shell
option?
noclobber
set -o noclobber
#NAME?
The Linux Kernel was written by?
Brian Kernighan
Dennis Ritchie
Richard Stallman
Linus Torvalds
What will show you all the subdirectories of
the current directory?
rm
ls
cd
cp
Which directory contains all the files needed
to boot the Linux system?
/dev
/boot
/bin
'mkfs' is used to:
create a filesystem on a device (such as a hard
disk partition)
format a floppy disk
create a fast changing section on a hard disk
create a named pipe (fifo) on a device
The ''rm'' command is used to:
remove a kernel module owned by you
run an M4 macro
mount a remote file system
delete a file
What makes up a Linux kernel?
base kernel
kernel modules
all of these
What is the ssh command?
It is the standard shell: it has a restricted set
of commands, but those are portable across different Linux distributions.
It is the synchronous shell: all commands are
performed in real-time.
It is the secure shell; it is used to restrict
actions available to users.
It is the secure shell; it is used to connect to
remote hosts via an authenticated and encrypted channel.
It is the synchronous shell: all commands are
performed in a synchrous way.
What does the pwd command do?
It saves the current working directory, so that you
can return there with the popd command.
It asks the password of the current user, and the
prompts for a new password.
It prints the path of the current working directory
It launches the power management daemon.
SSH stands for _____.
Security Shell
Synchronous Shell
System Shell
Secure Shell
Super Shell
mknod can create special file (used for
sending or receiving data) of type:
character file
fifo (pipe) file
all are correct
block file
If you wanted to execute a shell command in
the background, which character would you put at the end of the command line?
&
;
:
The loaded modules in the kernel are listed in
/proc/modules. You can get this list using the command:
lsmod
lsattr
listmodules
modules
Executing "pwd" in shell will
return:
None of these
There is no such command
Your password
Current directory
_____ is a Linux "desktop
environment".
XFCe
Gnome
KDE
All of these
What does it means when the ps commands shows
a 'Z' in the status column for a process?
The process is in sleep mode.
The process is running at top priority.
The process is a zombie process.
The process is running at low priority.
The netstat command give information on:
all are correct
active sockets
open sockets
routing tables
To repeat the last command in the bash shell
history, type...
!!
$HISTFILE
!6
How do you view the documentation for the
command 'kill' in the Linux terminal?
kill -help
kill --help
doc kill
cat /etc/docs/kill | less
man kill
What is swap?
Swap space is the area on a hard disk which is part
of the Virtual Memory of your machine (Swap+RAM)
Swap is the cache of your HDD
Swap is the cache of your Physical Memory (RAM)
Swap is the ability to switch between users in one
terminal session
Which answer assists you in finding help on
the whois command?
help whois
man whois
none of these
man help whois
To start another shell under the current shell
you use the command:
bash
All of these
sh
csh
To query DNS (Internet domain name) servers,
you use the command:
dns
lsrouted
dnsquery
nslookup
Add this symbol to a command to run it in the
background
&
*
2
$
?
What is the right command to save file and
exit in Vim?
:wq
:a
:q
:q!
:w 'file name'
Fedora Linux uses _____ packages.
deb
ebuild
deb_src
rpm
With which userspace is Linux typically
paired?
Hurd
System V
GNU
BSD
Minix
As a privileged user, you may set the hostname
with the command:
hostname
name
hn
host
What command can be used to delete a
directory, recursively searching for files and other directories and deleting
them?
rd
rmdir
rm -d
deltree
rm -r
On Red Hat Linux and its derivatives, which of
the following commands will be appropriate to check whether a particular
"package" is installed or not?
query-pkg
rpm -qa
pkg
sys
ls
To transfer files in an insecure way to and
from a remote network site host, you use the command:
ftp
tcp
ucp
sftp
Which firewall is most commonly used on Linux?
ipchains
ipfw
pf
iptables
/etc/resolv.conf is ...
Configuration file with local user accounts and its
identificators
Network interfaces configuration file
The DNS resolver configuration file
Configuration file with software sources
This file does not exist
LILO...
is a boot loader that can boot Linux
stands for "Lannister-In-Lannister-Out"
is only used by Slackware
stands for "Light Loader"
is a type of Linux Distro
LVM is...
Logical Volume Manager
Linux Video Manager
Linux Volume Manager
Light Video Manager
uname -a will output...
kernel info
architecture
date where the kernel was built
cpu info
All of the answers are correct.
Consider using the command "cd
/a/b/c", then executing "cd ..". What does this last command do?
changes to your home directory
displays the default directory path
prompts you for the next directory choice
changes to the / directory
changes to /a/b directory
Which tool is similar to find except that it
uses an index to search?
locate
fastfind
search
To read one or more files and type them on
standard output, you use:
ls
cat
type
biff
the '-r' switch to the mount command will:
mount remote (network) filesystems
mount filesystem only after a read-write check is
performed
mount removable (e.g., CD-ROM) filesystem
mount a filesystem as read-only
Which return value from an ioctl request
indicates success?
ENOTTY
0
EINVAL
EBADF
EFAULTF
The command "free" reports on:
memory
cpu
disk space
The jobs command
puts all foreground jobs in the background
lists background jobs
prints a dedication to Steve Jobs
provides basic accounting information for all
current jobs
halts all foreground jobs
What does the Linux "no" command do?
Nothing; it doesn't exist.
It's the opposite of the "yes" command;
it outputs an infinite series of 'n's (or a word of your choice).
It returns a non-zero exit code to indicate failure
(it's a synonym to the "false" command).
The command du -h ~
duplicates the current process
searches you home directory for duplicate filenames
deletes your account and home directory
lists the size of all files within your $HOME with
sizes in human readable form
dumps your home directory to /tmp
Why hasn't ZFS been added to the Linux kernel?
It's too hard to port filesystems to Linux
Oracle is suing the Linux Foundation
Sun's implementation uses a license incompatible
with the GPL
There is a user space port using FUSE
What does "chmod 755 file"
accomplish?
Makes the file read/write/execute by the owner,
read/execute by group and other.
Makes the file execute by the owner, execute/read
by group and other.
Makes the file write/execute by the owner, execute
by group and other.
Makes the file read by the owner, execute by group
and other.
Makes the file write/read by the owner, execute by
group and other.
LILO is _____.
used for LIsting the boot LOaders
a boot loader
lists all the devices
lists all the lower memory areas
a type of Linux
What is a zombie process?
A zombie process is a process created by a worm to
remain active even after it is killed.
A zombie process is a process which has terminated,
but whose parent had not yet read its exit status.
A zombie process is a process whose status had been
saved on the disk, and which is now waiting to be restored.
Which is an example of a shell comment?
mkdir text # make a directory
mkdir text //make a directory
//mkdir text
If a host is called HHH, 'rstat HHH' will:
show HHH uptime
show HHH load averages
all are correct
show HHH current time
Which of the following is not an editor?
expr
vi
emacs
ex
To use chown recursively, instead of using
_recursive you can use:
#NAME?
-r
-c
-R
How would you create an alias for the cat
command?
alias bkw=cat
You cannot do that.
ren bkw=cat
To access the value of an environment
variable, we _____.
add the dollar ($) symbol before the variable name
type the variable's name (in lower case only)
add the hash (#) symbol after the variable name
add the dollar ($) symbol after the variable name
add the underscore (_) symbol before the variable
name
How to reveal detailed information about CPU?
sysinfo --cpu
cpusage
dmesg
cat /proc/cpuinfo
_____ command starts the default desktop
environment.
gdm
xterm
startx
gdm-start
gnome-terminal
You want to load the main kernel module for
USB support. Which command would help you achieve this task?
modprobe usbcore
modprobe ehci-ocd
modprobe uhci-hcd
If DDD is a non empty directory, and you
execute 'rmdir DDD', it will:
move the contents of DDD to /tmp, and delete the
DDD directory
delete only the contents of the DDD directory
produce an error
delete both the contents of and the DDD directory
lsof command means:
Large Scale Optimization File
List Open Files
Local System Officer
Local Service of Files
Lag Spike of Death
Which of the following accurately describes a
"ping?"
sends ICMP packets to target device/server to
verify if it's online.
makes an audiable ping each time a disk drive start
spinning
verifies that the routing tables comply to the current
network state
sends TCP packets to target device/server to verify
if it's online.
What is the maximum length of a file name on
Linux?
255 bytes.
1023 bytes.
It depends on the file system.
1024 bytes.
256 bytes.
The run level in a system can be configured in
the file _____.
/bin/runlev
/sys/rinit
/bin/rlev
/etc/inittab
/etc/syslev
When does /tmp normally get cleaned out?
Never; it has to be manually cleaned.
Every time the system is booted.
Every week (run by /etc/cron.weekly).
Every month (run by /etc/cron.monthly).
To report the amount of free disk space
available on all mounted file systems you use the command:
free
fs
du
df
In a date +format, you add the hour in 24
hours format using:
%f
%H
%F
%h
What does the "uname" command do?
nothing
print system information
show the user name
change user name
If you use the rm command to accidentally
delete a file, how can you get the file back?
You cannot get the file back.
Go to the trash bin and remove it.
Type the rm -u command.
The behavior of the system for each
"runlevel" is available in the _____ file.
/etc/mtab
/etc/inittab
/etc/hosts
/etc/rlevel
/etc/crontab
command1 | command2 will?
Command1 and Command2 run together
Output command2 wil be input of command1
Output command1 wil be input of command2
Command2 run after Command1
printenv will:
print a text file to the printer specified in
/etc/env
print a text file to the printer specified in
$PRINTER
type values of environment variables
print a text file to the default printer
Is it possible to increase SWAP space without
rebooting?
No, you have to boot with a Live CD to do that
No, you have to reboot for the new swap to be
activated properly
No, you have to re-install your system to do that
Yes if you create a swap file
To print the first 10 lines of one or more
files to the standard output, you use the command:
topf
head
ftop
start
What flag makes "ls -l" print file
sizes in human readable format (e.g. 1K, 231M, 2G, etc)?
-f
-r
-H
-h
True or false: The Linux OS is not affected by
malware.
True
False
Which Run Level provides "Full multiuser
mode with network and X display manager"?
Run Level 4
Run Level 5
Run Level 1
Run Level 3
Run Level 2
To create one or more directories with the
mkdir command, which permissions in the directory's parent directory do you
need?
create
write
execute
read
To display contents of files on standard
output, you could use the command:
All of these
cat
more
less
The at command allows you to execute a command
at:
a certain machine
a certain holiday
a certain date
a certain network
In a ps command output, the PPID displays the:
Number of memory pages (swap) of the process
Process's scheduling priority
Process ID
Parent process ID
'mv -f' will:
even if the target file exists, the operation will
be carried out (and no warning messages on restricted access modes will be
printed)
move the file to the filesystem indicated after the
'-f' switch
will move the file in a fast mode, namely will not
make any checks (like if there's enough space for the file)
will move the file or directory to a FIFO device
_____ is not a 'Terminal Emulator'.
konsole
xterm
gnome-terminal
gdm
How do you redirect stderr to stdout?
Using >>stderr
Using 2>&1
Using >/dev/error
What, according to bc, is 2^2?
4.00000001
4
2
A syntax error.
Typing the "cd" command at the shell
prompt will take you to the _____.
/root
parent
current
$HOME
/boot
modinfo [options] ofile' will:
create a help file for kernel module ofile
print information about kernel module ofile
set information about kernel module ofile
set default handling options for kernel module
ofile
modprobe...
types the header section of the specified module
searches all filesystems for the specified module
searches memory to see if the specified module is
loaded to memory
attempts to load a kernel module along with all its
depended modules
Which of the following file 'probably'
contains the 'user specific' settings for the "windows manager"?
/X11/xinit/xinitrc
$HOME/.xinitrc
/xinit/xinitrc
/.xinitrc
/etc/X11/xinit/xinitrc
To search one or more files for matching
lines, which command may be used?
grep
egrep
fgrep
All of these
What does the $ represent within the context
of a shell command?
The string after the $ is replaced by a directory
name.
all of these
The string after the $ will take on the value of
the environment variable with the same name.
Write a command to list all files with 5
characters in the name.
ls !!!!!
ls ?????
ls *****
The mkraid command will:
separate the disk devices into two groups and will create
RAID 1/0 on them
initialize a new RAID array, destroying any
existing data on the disks used
move any data on the disk devices used to create
the array into the new RAID
create a new RAID 5 on the disk devices
Single User Mode equivalent to _____.
run level 4
run level 1
run level 3
run level 2
run level 0
What binary format do Linux Executables use?
PE
ELF
Mach-O
a.out
COFF
To see the kernel routing tables, you do:
route or netstat -r
routing
route -w
cat /etc/routetab
What is "vmlinuz"?
It is a "virtual machine" used in Linux.
It is a "type of Linux Shell".
This command executes Linux in "virtual
mode".
It is a "compressed Linux kernel".
It is a "type of Linux operating system".
What is the uid of root?
-1
0
superuser
1000
1
pwconv will...
convert /etc/passwd file so non previleged users
could edit it
revert the system to use unshadowed passwords
convert entries in /etc/passwd (un-shadowed) into
shadowed entries in /etc/shadow
convert /etc/passwd entries from Unix to Linux
format
SSH uses _____ to authenticate remote
computers.
public key cryptography
secret key cryptography
both block and stream ciphers
stream cipher
block cipher
By default what file contains encrypted user
passwords?
/etc/password
/etc/master.passwd
/etc/passwd
/etc/shadow
/etc/passwdinfo
'mkdir -m 444 any' will:
Create a read-write-execute directory named any
create a read-only directory named any
Create a write-only directory named any
Create a read-write directory named any
What program is launched by the kernel at
system start up first?
/sbin/start
/boot
/sbin/initial
/sbin/init
/etc/rc.d/rc.sysinit
How do you make a list of all filenames in the
/tmp directory that the contain the text "user", regardless of case?
ls /tmp : grep user
ls /tmp | grep user
ls /tmp | grep -i user
grep user /tmp
ls /tmp | find user
rev will:
reverse the order of characters read from standard
input and type the result stream of characters to standard output
reverse the spin of a local disk drive
review the networking status and alert on problems
type the system revision number to standard output
Can I have swap partition and swap file
activated at the same time?
Yes
No
Only if you set 'vm.swappiness=100'
Only if you set priority of swap containers
To write a message to all users (on their
terminals) over a network, you use:
rwrite
write
rwall
wall
What will you get if you try to read from the
pseudo-device /dev/null?
An infinite string of zeroes ('0', ASCII 0x30).
An error (/dev/null can only be written to, not
read from).
An infinite string of nulls ('\0', ASCII 0x00).
Nothing.
How to display current iptables rules?
ipfw
iptables -L
iptables -l
route -n
iptables --show
How do you find all files in /etc which end in
.conf?
find /etc *.conf
find /etc -name "*.conf"
all of these
Executing the command "init 6" will
_____.
set the run level to 0
kill the "init" process
change the user interface to CUI
reboot the system
halt the system
What does it mean when a variable is unbound?
It is not defined.
It exists but is not a displayable type.
For what purposes can socat be used?
Bridging a TCP and UDP service
Concatenating arbitrary pcap files to the network
SOCKS Proxy
IPv6 to IPv4 bridging
All of these
What source control system does the Linux
kernel use?
patches
bitkeeper
git
svn
cvs
Information about modules, like module
dependency, and where certain types of modules reside in the filesystem, is
found in:
/etc/infomod.conf
/etc/lsmod.conf
/etc/modinfo.conf
/etc/modules.conf
The user smith issued the egrep
"^[[:upper:]]" words.txt command. What does this command do?
displays all lines in the words.txt file after
translating lowercase letters to uppercase
displays all lines in the words.txt file that begin
with an uppercase letter
displays all lines in the words.txt file that
contain an uppercase letter
displays all lines in the words.txt file after
translating uppercase letters to lowercase
What is not part of the Linux Kernel?
Word Processor
The bash shell
C Compiler
All of these
To send a file to the printer spool queue, you
use the command:
pr
spool
lpr
print
Which of the following commands can be used to
change the run level?
runlevel -c
inittab
rlev -l
mod-runlevel
init
"Run Level Zero (0)" stands for
_____.
Single User Mode
Multi User Mode
Halt
Reboot
Not Used/User Definable Mode
options (switches) to the ps command may start
with:
-
--
all are correct
nothing
Which of the following files 'probably'
contains the default "windows manager settings"?
$HOME/.xinitrc
/xinit/xinitrc
.xinitrc
/X11/xinit/xinitrc
/etc/X11/xinit/xinitrc
If the system is not in runlevel 0 or 6,
before performing a power-off operation, the poweroff command will execute:
shutdown -S
shutdown -s
shutdown -r
shutdown -h
Reset will...
reboot a system
clear your session's screen (terminal)
restart a program
disconnect all processes from a disk drive
To format a device as a Linux second extended
filesystem (ext2), you use the command:
Both mke2fs and mkfs.ext2
mke2fs
mkfs.ext2
What will "cat /proc/mdstat" tell
you?
The state of your RAID file system (if any).
The list of MSDOS file systems that you have
mounted (if any).
The MD5 hash of the running kernel for
security/integrity purposes.
The magnetic tape drive's status (if any).
"cat: /proc/mdstat: No such file or
directory" :P
What does the following line mean when it is
run in a script '#!/bin/bash'?
It makes sure that the script runs in the bash
shell.
It checks to see if the bash shell exists on the
machine.
all of these
Given that the ip command is installed, what
is the effect of the command ip a ls
It lists the neighbours of the system on an IP
network.
Command "ls" is unknown, try "ip
addr help".
It lists the defined interfaces and the addresses
associated with those interfaces.
The backslash on the command line indicates
the root directory
a command pipe
a one-character escape
the end of a file
a regular expression search
What does permission 641 (octal) mean?
Owner can read and write; group can write; other
can read
Owner can read and write; group can write and
execute; other can read
Owner can read, write and execute; group can read
and write; other can read
Owner can read and write; group can read; other can
execute
Owner can read and execute; group can read and
write; other can execute
The acronym WINE stands for:
Wine is not an Emulator
Windows Emulator
Windows Environment
Wine is Not for Eunichs
In a BASH script this command line parameter
contains the scripts own name:
$NAME
$$
$?
$0
$1
In bash you can use these quote marks for
command substitution.
backquotes ` `
forward slashes / /
single quotes ' '
double quotes " "
backslashes \ \
What happens if you try to write to /dev/null
and /dev/zero?
You cannot write to /dev/null, only to /dev/zero.
Nothing.
You cannot write to /dev/zero, only to /dev/null.
You cannot write to either of them, only read from
them.
Which of the following is a way to update
mlocate's index?
updatedb
dbupdate
find -mlocate
mlocate -u
dbmlocate
In the command 'mv source target', if source
is a directory and target is an existing directory, the result will be to:
overwrite 'target' directory with 'source'
directory
move 'source' directory to be a subdirectory of
'target' directory
move 'source' directory to be on same level in the
directory tree as 'target' directory
merge 'target' directory with 'source' directory
Running "man --locale=LLL" instructs
man to override the value of which of these functions?
local(LLL)
whereami()
setlocale()
local()
Which of the following commands will correctly
display the version of the Linux kernel running?
All three commands work
uname -r
uname -o
None of these commands work
sysinfo
mktemp -d' will:
will create a dump filesystem
will create a swap filesystem
will create a temporary filesystem
create a unique temporary directory (e.g., for
script's commands usage)
newaliases will:
rebuild the mail aliases database that reside in
/etc/aliases
types all the aliases the news reader uses
updates the news reader's aliases from the file
/etc/aliases
'mv -u' will:
not remove a file or link if its modification date
is the same as or newer than that of its replacement
will create a backup of the target so an 'undo' is
possible
undo the last mv command performed on the same
filesystem
will translate DOS formatted files to Unix format
(e.g., will change end-of-line characters)
How find the current system runlevel?
sys level show
init
init -q
runlevel -h
runlevel
To format a device as an ext3 (journaled)
Linux extended filesystem, you use the commands:
mkfs.ext3
all are correct
mkfs.ext2 -j
To do unlimited precision arithmetic
calculations from the shell, you use:
All of these
bc
cal
calc
You need which of the following access modes
in order to cd to a system directory?
t
w
r
x
s
What does the Linux "yes" command
do?
Nothing; it doesn't exist.
It outputs an infinite series of 'y's (or the word
of your choice).
It returns the exit code 0 to indicate success
(it's a synonym to the "true" command).
The ________ command can be used to
"kill" the 'X server'.
Ctrl + D
Ctrl + Shift + Bksp
Ctrl + X
Ctrl + Alt + Del
Ctrl + Alt + Bksp
nfsstat will...
create or update remote NFS users from entries in
the file /etc/nfsstat
activate kernel threads for the NFS (Network File
System) kernel module
display an NFS user status on both server and
client side systems
type statistics on NFS and remote procedure call
(RPC) activity for both client and server systems
What is the purpose of the "tset"
command?
To set a temporary variable.
To catch misspellings of the "test"
command (they're the same).
None; there is no such command in standard Linux.
To control thread execution.
To identify and initialize a terminal.
What is the expected output of the following
command: unset x; test -z $x && echo 1
It depends: an error, if x is not set; nothing
otherwise
Nothing.
0
It depends: an error, if x is not set; 1 otherwise
1
As a non-privileged user, if you use 'nice',
it will:
will lower already running background processes
priority
reshuffle directory entries, so ls will produce a
pretty display
execute a command with a set priority (may be
higher)
execute a command with lower priority
If no filesystems are specified on the command
line, and the _____ option is not specified, then the command "fsck"
will default to checking filesystems in "/etc/fstab" serial order.
-B
-A
-D
-E
-C
Which of the following commands shows routing
table information?
routeshow
route --list
ip route show
ip route get
net stat
Man pages are written using what markup
language?
HTML
TROFF
PERLDOC
UTF-8
RTF
How are typical native code debuggers implemented?
By loading traced program's code into the heap
segment of the debugger which then acts as a virtual machine.
By a special system call that allows one process to
control and trace execution of another.
By requesting the kernel scheduler to suspend the
traced process and then analyzing its memory segments.
Using virtualization technology.
/bin/true is a command whose exit status is
always:
0
True
False
1
What is cgroups ?
Feature to control user permissions
Linux kernel feature to control resource usage
Command to create new group of users
Special group of users, that can use sudo
This technology is not implemented in linux
What is the file /etc/nsswitch.conf?
tool to configure Ethernet switch
a PAM (Pluggable authentication modules) configuration
file
facility that provides a variety of sources for
common configuration databases and name resolution mechanisms
Windows manager configuration file
name server information
Which command is used for initializing
physical volume(hard disk, or partition) for LVM usage?
pvmake
pvinit
lvm -p create
pvcreate
pvck
To create hard-links instead of copies with
the cp command, you use:
All of these
-l
--perm-link
--cp
In POSIX-compatible shell, what will you see
if you enter "echo foo*" when there are no files beginning with
"foo" in the current directory?
foo
foo*
foo*: No such file or directory.
echo: No such file or directory.
Nothing.
Which one of these lines will check if the
directory "foo" exists and create it if it doesn't?
mkdir -p foo
test -d foo || mkdir foo
if [ ! -d foo ]; then mkdir foo; fi
All but one of them.
All of them.
What is the maximum size of an ext3 file
system?
1 PiB (1,125,899,906,842,624 bytes).
256 TiB (281,474,976,710,656 bytes).
32 TiB (35,184,372,088,832 bytes).
There is no theoretical limit.
1 EiB (1,152,921,504,606,846,976 bytes).
Which command will tell you how long a system
has been up and running since it was last booted?
w
who -b
cat /proc/uptime
All answers are correct.
uptime
The cksum command will read from standard
input if:
All of these
'.' is used
=' is used
'-' is used
In a file delimited by commas, what command
will print the 3rd column of data:
awk -f, '{print $3}'
awk '{print $3}'
awk -F, '{print $3}'
What does the command "set $(date)"
do?
It changes the order of the date fields
It sets the system date
It parses the system date into command line
parameters $1 - $6
It displays the current system's setup date
It displays the system date
in terms of system calls, when bash process
executes cat </tmp/input command it does the following:
issues the exec system call to execute the cat
program and then issues a system call to substitute standard input with
/tmp/input
issues the exec system call to execute the cat
program, then issues a system call to close the lowest file descriptor and
finally issues a system call to open /tmp/input
issues a system call to create a new copy of
itself, in that copy it issues a system call to substitute standard input with
/tmp/input and finally issues the exec system call to execute the cat program
issues a system call to create a new copy of
itself, in that copy it issues a system call to close the lowest file
descriptor, then issues a system call to open /tmp/input and finally issues the
exec system call to execute the cat program
mklost+found:
is an invalid command
is a configuration file for sendmail located in
/var
creates a lost+found directory in the root
directory /
creates a lost+found directory in the current
working directory
What are the six fields of /etc/fstab?
Device, mount point, file system type, mount
options, fsck pass number, dump frequency.
Device, mount point, mount options, file system
type, fsck pass number, dump frequency.
Device, mount point, mount options, file system
type, dump frequency, fsck pass number.
Device, mount point, file system type, mount
options, dump frequency, fsck pass number.
Six fields? There are only five: Device, mount
point, mount options, and two more fields that are no longer used.
The equivalent to whatis command is:
apropos
man -f
w
what -a
The ____ command will display LVM volume
groups.
vgdisplay
lvshow
vglist
vgl
vgstatus
What is the default delimiter for the command
"cut"?
\n
<TAB> or <SPACE>
<SPACE>
\0
<TAB>
What is the result of echo '$MyVar' ?
MyVar
the value of $MyVar
$MyVar
modprobe -d:
deactivate a module in memory.
specifies the directory where modules can be found.
deletes a module from the filesystem.
deletes a module from memory.
types debugging information regarding a module.
A user has a file called OriginalFile, and
then creates a hard link to it by executing the following command (brackets not
part of command): [ cp -l OriginalFile CopyOfFile ] Which of the following are
true?
Deleting CopyOfFile will delete OriginalFile
Moving OriginalFile to a new directory will cause
CopyOfFile to become a broken link
All of these are true
None of these are true
Editing CopyOfFile will affect OriginalFile
Apart from SIGKILL, which other signal cannot
be caught nor ignored?
SIGTRAP
SIGXCPU
SIGSYS
SIGPWR
SIGSTOP
What file will show you how the kernel was
started?
/proc/bootargs
/boot/grub/menu.lst
/boot/grub/grub.conf
/proc/cmdline
Can `ip` in iproute2 take multiple commands in
a row?
Yes, using `ip -sequence`
Yes, using `ip --file`
No
Yes, using `ip -batch`
Yes, using `ip -f`
The last privileged port (any port that can't
be opened by anyone else but the root user) is:
1023
1025
999
1024
Will tar extract information about file
permissions?
Yes, if "-p" specified or is root.
No.
Yes, only if "-p" specified.
Yes, only if it's root.
Yes, only on NTFS volumns.
In chgrp command, the letter you use to add a
sticky bit (e.g., to prevent removal of files by non-owner from a directory)
is:
l
s
y
t
newgrp will:
create a new group on the system
create a new group and potentially add users to it
change user's group ID (GID)
change group's parameters
To block/allow regular users to send write
messages to your session, you use:
write -q
block [-y|-n]
term -q
mesg
In BASH scripts the symbols
"<<" indicate...
rapid query
much less than
left shift
input redirection
a "here" document
What will you get if you try to read from the
pseudo-device /dev/zero?
An infinite string of zeroes ('0', ASCII 0x30).
An infinite string of nulls ('\0', ASCII 0x00).
Nothing.
An error (/dev/zero cannot be read from, only
written to).
Which file would be returned by ls File[A5] ?
FileAB
FileA5
none of these
FileA
Can you make hard links to directories just as
you can to ordinary files?
Yes, but only in single user mode.
Sometimes, depending on file system restrictions.
Yes, there's no difference between hard linking
files / directories.
No, that would corrupt the requirement that every
file only has one parent directory.
Subscribe to:
Posts (Atom)