CSCI 330 MIDTERM EXAM QUESTIONS WITH
CORRECT ANSWERS
LS |- |CORRECT |ANSWER✔✔-list |files |in |current |directory
pwd |- |CORRECT |ANSWER✔✔-print |the |path |of |the |current |working |directory
clear |- |CORRECT |ANSWER✔✔-clear |whatever |was |being |displayed |to |the |terminal
date |- |CORRECT |ANSWER✔✔-prints |the |current |date |and |time
passwd |- |CORRECT |ANSWER✔✔-change |the |password |of |the |current |user
ls |-l |- |CORRECT |ANSWER✔✔-list |more |information |on |files |in |the |current |directory
ls |-a |- |CORRECT |ANSWER✔✔-show |all |the |files |in |the |directory |including |the |hidden |files
ls |file |- |CORRECT |ANSWER✔✔-shows |the |file |named |file |if |it |exists
exit |- |CORRECT |ANSWER✔✔-exits |the |current |shell |instance, |logging |out |if |none |left
What |is |argc? |- |CORRECT |ANSWER✔✔-Number |of |arguments |(short |for |argument |
count)
,What |is |argv? |- |CORRECT |ANSWER✔✔-this |is |an |array |of |C |strings, |one |string |per |
command |line |argument.
echo |- |CORRECT |ANSWER✔✔-prints |its |command |line |arguments
more |- |CORRECT |ANSWER✔✔-show |content |of |file, |page |by |page
logout |- |CORRECT |ANSWER✔✔-logout |from |system
who |- |CORRECT |ANSWER✔✔-displays |who |is |on |the |system
script |- |CORRECT |ANSWER✔✔-make |record |of |the |terminal |session
uname |- |CORRECT |ANSWER✔✔-print |current |OS |detail(version |etc)
man |- |CORRECT |ANSWER✔✔-find |and |display |system |manual |pages
/ |- |CORRECT |ANSWER✔✔-Root |directory, |top |most |directory |in |any |UNIX |file |structure
~ |- |CORRECT |ANSWER✔✔-Home |directory. |Directory |owned |by |user, |default |location |when |
user |logs |in
. |- |CORRECT |ANSWER✔✔-current |dirrectory, |default |location |for |working |with |files
.. |- |CORRECT |ANSWER✔✔-Parent |irectory |immediately |above |the |current |directory
, Absolute |path |- |CORRECT |ANSWER✔✔-traces |a |pth |from |root |to |a |file |or |a |directory. |Always |
beings |with |the |root |(/) |directory.
EXAMPLE: |/home/student/Desktop/assign1.txt
Relative |path |- |CORRECT |ANSWER✔✔-a |path |that |begins |at |the |current |working |directory, |no |
initial |forward |flash(/).
EXAMPLE: |Desktop/assign1.txt
mkdir |- |CORRECT |ANSWER✔✔-make |a |new |directory
cd |- |CORRECT |ANSWER✔✔-change |directory
rmdir |- |CORRECT |ANSWER✔✔-Removes |an |empty |directory
rmdir |-r |- |CORRECT |ANSWER✔✔-Removes |a |directory |that |contains |files
ls |-t |- |CORRECT |ANSWER✔✔-shows |files |sorted |by |time |stamp
ls |-S |- |CORRECT |ANSWER✔✔-shows |files |sorted |by |file |size
ls |-r |- |CORRECT |ANSWER✔✔-shows |files |in |reverse |sorted |order
cp |[source] |[target] |- |CORRECT |ANSWER✔✔-to |copy
source |- |is |one |or |more |paths |for |items |to |copy
targer |- |where |to |put |the |copy/copies
• |if |only |copying |a |single |file |and |target |does |not |exist, |it |is |created |and
CORRECT ANSWERS
LS |- |CORRECT |ANSWER✔✔-list |files |in |current |directory
pwd |- |CORRECT |ANSWER✔✔-print |the |path |of |the |current |working |directory
clear |- |CORRECT |ANSWER✔✔-clear |whatever |was |being |displayed |to |the |terminal
date |- |CORRECT |ANSWER✔✔-prints |the |current |date |and |time
passwd |- |CORRECT |ANSWER✔✔-change |the |password |of |the |current |user
ls |-l |- |CORRECT |ANSWER✔✔-list |more |information |on |files |in |the |current |directory
ls |-a |- |CORRECT |ANSWER✔✔-show |all |the |files |in |the |directory |including |the |hidden |files
ls |file |- |CORRECT |ANSWER✔✔-shows |the |file |named |file |if |it |exists
exit |- |CORRECT |ANSWER✔✔-exits |the |current |shell |instance, |logging |out |if |none |left
What |is |argc? |- |CORRECT |ANSWER✔✔-Number |of |arguments |(short |for |argument |
count)
,What |is |argv? |- |CORRECT |ANSWER✔✔-this |is |an |array |of |C |strings, |one |string |per |
command |line |argument.
echo |- |CORRECT |ANSWER✔✔-prints |its |command |line |arguments
more |- |CORRECT |ANSWER✔✔-show |content |of |file, |page |by |page
logout |- |CORRECT |ANSWER✔✔-logout |from |system
who |- |CORRECT |ANSWER✔✔-displays |who |is |on |the |system
script |- |CORRECT |ANSWER✔✔-make |record |of |the |terminal |session
uname |- |CORRECT |ANSWER✔✔-print |current |OS |detail(version |etc)
man |- |CORRECT |ANSWER✔✔-find |and |display |system |manual |pages
/ |- |CORRECT |ANSWER✔✔-Root |directory, |top |most |directory |in |any |UNIX |file |structure
~ |- |CORRECT |ANSWER✔✔-Home |directory. |Directory |owned |by |user, |default |location |when |
user |logs |in
. |- |CORRECT |ANSWER✔✔-current |dirrectory, |default |location |for |working |with |files
.. |- |CORRECT |ANSWER✔✔-Parent |irectory |immediately |above |the |current |directory
, Absolute |path |- |CORRECT |ANSWER✔✔-traces |a |pth |from |root |to |a |file |or |a |directory. |Always |
beings |with |the |root |(/) |directory.
EXAMPLE: |/home/student/Desktop/assign1.txt
Relative |path |- |CORRECT |ANSWER✔✔-a |path |that |begins |at |the |current |working |directory, |no |
initial |forward |flash(/).
EXAMPLE: |Desktop/assign1.txt
mkdir |- |CORRECT |ANSWER✔✔-make |a |new |directory
cd |- |CORRECT |ANSWER✔✔-change |directory
rmdir |- |CORRECT |ANSWER✔✔-Removes |an |empty |directory
rmdir |-r |- |CORRECT |ANSWER✔✔-Removes |a |directory |that |contains |files
ls |-t |- |CORRECT |ANSWER✔✔-shows |files |sorted |by |time |stamp
ls |-S |- |CORRECT |ANSWER✔✔-shows |files |sorted |by |file |size
ls |-r |- |CORRECT |ANSWER✔✔-shows |files |in |reverse |sorted |order
cp |[source] |[target] |- |CORRECT |ANSWER✔✔-to |copy
source |- |is |one |or |more |paths |for |items |to |copy
targer |- |where |to |put |the |copy/copies
• |if |only |copying |a |single |file |and |target |does |not |exist, |it |is |created |and