4. I want to uncompress and unarchive the file: hello.tar.bz2 What command would
ID: 3551952 • Letter: 4
Question
4. I want to uncompress and unarchive the file:
hello.tar.bz2
What command would do this?
bunzip hello.tar.bz2
gunzip hello.tar.bz2
tar xzf hello.tar.bz2
tar xjf hello.tar.bz2
5. I have a file named 'hello.tar.gz.' I want to uncompress and unarchive the file. Which command would do this?
tar xfz hello.tar.gz
tar fz hello.tar.gz
tar xfj hello.tar.gz
Tar xjf hello.tar.gz
6. I run 'history' and see the following:
....
492 ls -al
493 clear
494 sudo cat /etc/passwd
495 ls -al
496 clear
I want to rerun the command 'sudo cat /etc/passwd'.
Which command would do this?
!!
494$
!494
!sudo cat /etc/passwd
7. I have a file named 'bigfile' in ~. I want to rename the file to 'oldfile', and I want to move it to ~/Documents. The command that would do this is:
rename bigfile oldfile | ~/Documents
mv ~/bigfile ~/Documents/oldfile
mv bigfile oldfile < ~/Documents
cat bigfile | ~/Documents
Displays only power users
Is used to concatenate files
Is always used with find or grep.
10. Which of the following commands would find empty files (not directories) under /etc?
sudo find /etc -type f
sudo find /etc -type d -exec empty {} ;
sudo find /etc -type f -empty
sudo grep /etc -empty
11. I want to find files under / that have the characters 'FSU' in them, case insensitive. Which command would do this?
sudo grep -iname 'FsU'
sudo find / -type f -iname '*fsu*'
sudo grep -r / 'FSU'
sudo find ~ -type f -name 'FSU*'
12. I'm in ~. I want to create a tar file named "mydocs.tar" that contains all files in ~ ending in .doc. What command would I run?
tar cf mydocs.tar *.doc
It can't be done!
tar xvf mydocs.tar *.doc
sudo tar cvfz mydocs.tar *.doc
13. I want to compress the file 'moNster.tar'. Which command would I use?
bzip2 moNster.tar
bunzip moNster.tar
tar -xzvf moNster.tar
bzip2 monster.tar
14. I want to find all files under ~ that were modified less than 10 minutes ago. The command I run would be:
find ~ -amin -10
15. I want to search for files under ~ that contain the keyword "Flumox," and to redirect that output to a new file called "Flumox.txt". The command would be:
grep -R "Flumox" ~ > ~/Flumox.txt
grep -i "Flumox" > Flumox.txt
find -R "Grep" ~ < Flumox.txt
find -name 'Flumox' > Flumox
16. I'm in the following directory:
~
17. I'm in my home directory and want to create the following directory hierarchy with one command:
~/calculus/homework/june/2012
Which command would do this?
mkdir -r calculus/homework/june/2012
mdir -p calculus/homework/june/2012
mkdir -p /calculus/homework/june/2012
mkdir -p calculus/homework/june/2012
18. I'm in the directory:
/var/log/mail/map/june/2012/calculus/hard/problems/yikes/do/not/want/to/fail/this/class/again
I 'cd' back to my home directory using 'cd ~'.
Now I want to flip BACK to the preceding directory (/var/log/mail, etc.).
What's the fastest way to do that?
cd -
cd / var/log/mail/map/june/2012/calculus/hard/problems/yikes/do/not/want/to/fail/this/class/again
cd ~
cd ../../../../../../../../../../../../../../../
19. I want to install the program "ruprecht" under Mint. Easiest way to do that is:
aptitude install ruprecht
sudo aptitude install ruprecht
sudo atitude install ruprecht
Can't be done in Linux.
20. I want a long listing of all files, including hidden files, in all directories residing under ~/POWER, and I want to save it to a file called 'myfiles'. What command would do this?
sudo ls ~/POWER < myfiles
ls -alR ~/POWER > myfiles
ls -alR ~ > myfiles
ls > files > ~/POWER
21. I want to update my system with the most recent packages. I do that with:
atitutde update
atitude safe-upgarde
aptitude update && atitude safe-upgrade
su, su, sudio safe-upgrade
sudo aptitude update && sudo aptitude safe-upgrade
22. I can't remember the command to delete a directory. A good way to find commands that have either the word 'delete' in it, or in the description, would be to run:
delete --help
apropos delete
find / -name delete
man delete
23. I want to know what devices are mounted on my system. The best way to find out is to run:
mount
umount
sufo fdisk -l
dmesg | grep -exec sort {} ;
24. I want to find all regular files in my /var/log/mail directory with a '*.txt' extension that are empty. What command would do this?
find /var/log/mail -name '*.txt'
sudo find /var/log/mail -type f -name '*.txt' -empty
sudo find ~/VAR/LOG/MAIL -empty
find / -type f -name '*.txt' -empty
1)Clears the terminal screen 2)
Sends packets to a remote system 3)
Clears your history
Clears a user's password
4. I want to uncompress and unarchive the file:
hello.tar.bz2
What command would do this?
Question 4 options:bunzip hello.tar.bz2
gunzip hello.tar.bz2
tar xzf hello.tar.bz2
tar xjf hello.tar.bz2
5. I have a file named 'hello.tar.gz.' I want to uncompress and unarchive the file. Which command would do this?
Question 5 options: 1)tar xfz hello.tar.gz
2)tar fz hello.tar.gz
3)tar xfj hello.tar.gz
4)Tar xjf hello.tar.gz
6. I run 'history' and see the following:
....
492 ls -al
493 clear
494 sudo cat /etc/passwd
495 ls -al
496 clear
I want to rerun the command 'sudo cat /etc/passwd'.
Which command would do this?
Question 6 options: 1)!!
2)494$
3)!494
4)!sudo cat /etc/passwd
7. I have a file named 'bigfile' in ~. I want to rename the file to 'oldfile', and I want to move it to ~/Documents. The command that would do this is:
Question 7 options: 1)rename bigfile oldfile | ~/Documents
2)mv ~/bigfile ~/Documents/oldfile
3)mv bigfile oldfile < ~/Documents
4)cat bigfile | ~/Documents
8. The 'who' command ... Question 8 options: 1) Doesn't exist 2) Displays everyone who is logged in 3)
Displays only power users
4) Displays who I am (my user ID)9. | (pipe) is used for what? Question 9 options: 1) Is used to create little walls between things in Linux 2)
Is used to concatenate files
3) Is used to chain commands together 4)Is always used with find or grep.
10. Which of the following commands would find empty files (not directories) under /etc?
Question 10 options:sudo find /etc -type f
sudo find /etc -type d -exec empty {} ;
sudo find /etc -type f -empty
sudo grep /etc -empty
11. I want to find files under / that have the characters 'FSU' in them, case insensitive. Which command would do this?
Question 11 options:sudo grep -iname 'FsU'
sudo find / -type f -iname '*fsu*'
sudo grep -r / 'FSU'
sudo find ~ -type f -name 'FSU*'
12. I'm in ~. I want to create a tar file named "mydocs.tar" that contains all files in ~ ending in .doc. What command would I run?
Question 12 options:tar cf mydocs.tar *.doc
It can't be done!
tar xvf mydocs.tar *.doc
sudo tar cvfz mydocs.tar *.doc
13. I want to compress the file 'moNster.tar'. Which command would I use?
Question 13 options:bzip2 moNster.tar
bunzip moNster.tar
tar -xzvf moNster.tar
bzip2 monster.tar
14. I want to find all files under ~ that were modified less than 10 minutes ago. The command I run would be:
find ~ -amin -10
Question 14 options: True False15. I want to search for files under ~ that contain the keyword "Flumox," and to redirect that output to a new file called "Flumox.txt". The command would be:
Question 15 options:grep -R "Flumox" ~ > ~/Flumox.txt
grep -i "Flumox" > Flumox.txt
find -R "Grep" ~ < Flumox.txt
find -name 'Flumox' > Flumox
16. I'm in the following directory:
~/Docs/2012/usf/linux/spring/night
If issue this command:
cd ../../../..
In what directory would I be now?Question 16 options:
~/Docs/2012/usf/linux/
~
~/Docs/2012/
~/Docs/2012/usf/
17. I'm in my home directory and want to create the following directory hierarchy with one command:
~/calculus/homework/june/2012
Which command would do this?
Question 17 options:mkdir -r calculus/homework/june/2012
mdir -p calculus/homework/june/2012
mkdir -p /calculus/homework/june/2012
mkdir -p calculus/homework/june/2012
18. I'm in the directory:
/var/log/mail/map/june/2012/calculus/hard/problems/yikes/do/not/want/to/fail/this/class/again
I 'cd' back to my home directory using 'cd ~'.
Now I want to flip BACK to the preceding directory (/var/log/mail, etc.).
What's the fastest way to do that?
Question 18 options:cd -
cd / var/log/mail/map/june/2012/calculus/hard/problems/yikes/do/not/want/to/fail/this/class/again
cd ~
cd ../../../../../../../../../../../../../../../
19. I want to install the program "ruprecht" under Mint. Easiest way to do that is:
Question 19 options:aptitude install ruprecht
sudo aptitude install ruprecht
sudo atitude install ruprecht
Can't be done in Linux.
20. I want a long listing of all files, including hidden files, in all directories residing under ~/POWER, and I want to save it to a file called 'myfiles'. What command would do this?
Question 20 options:sudo ls ~/POWER < myfiles
ls -alR ~/POWER > myfiles
ls -alR ~ > myfiles
ls > files > ~/POWER
21. I want to update my system with the most recent packages. I do that with:
Question 21 options:atitutde update
atitude safe-upgarde
aptitude update && atitude safe-upgrade
su, su, sudio safe-upgrade
sudo aptitude update && sudo aptitude safe-upgrade
22. I can't remember the command to delete a directory. A good way to find commands that have either the word 'delete' in it, or in the description, would be to run:
Question 22 options:delete --help
apropos delete
find / -name delete
man delete
23. I want to know what devices are mounted on my system. The best way to find out is to run:
Question 23 options:mount
umount
sufo fdisk -l
dmesg | grep -exec sort {} ;
24. I want to find all regular files in my /var/log/mail directory with a '*.txt' extension that are empty. What command would do this?
Question 24 options:find /var/log/mail -name '*.txt'
sudo find /var/log/mail -type f -name '*.txt' -empty
sudo find ~/VAR/LOG/MAIL -empty
find / -type f -name '*.txt' -empty
Explanation / Answer
1. clear
2. scp command
3. history -c && history -w
4.tar xjf hello.tar.bz2
5.Tar xjf hello.tar.gz
6.494$
7.mv ~/bigfile ~/Documents/oldfile
8.Displays who I am (my user ID)
9.Is used to chain commands together
10.
sudo find /etc -type d -exec empty {} ;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.