Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Closed Thread
  Search this Thread
Old 08-09-2005, 03:09 AM   #1
LQ Newbie
Registered: Aug 2005
Posts: 3

Rep: Reputation: 0
General questions - Help :-)

I have some basic question in Linux might someone help?

1.How can I fetch line number 7 from file ‘f1’ ?
a. tail -7 f1 | head -1
b. tail +7 f1 | head -1
c. head -7 f1 | tail -1
d. answers b & c are correct.

2.What’s the outcome of ‘ls 2>&1’ ?
a. regular ls.
b. all the errors will go to /dev/null.
c. all the errors will go to &1, which is the first Shell I open.
d. search for the file ‘2>&1’.

3.How can I find all the directories under ‘/etc’ and dispose all the errors?
a. find –type dir |& /dev/null.
b. ls –R /etc | find –type d > /dev/null
c. find /etc –type d 2> /dev/null.
d. find /etc –type d -noerr

4.What’s the use of ‘/dev/null’?
a. It’s a block device file.
b. It’s a device file for writing errors to.
c. It’s a device file for writing special logs to.
d. It’s a device file. What ever you send it, the system deletes.

5.How can I redirect a process output to a log file, and also see it on screen?
a. someproc > pipefile | logfile.
b. someproc | tee logfile screen
c. tee someproc | logfile
d. someproc |tee logfile

6.What’s the purpose of ‘X’ permission on a directory?
a. run the directory as a special process.
b. load the directory to the ram (memory).
c. enables to enter the directory and all of the dirs below it.
d. If a directory doesn’t have it, you can’t access it and all it’s sub-dirs.

7.Default router (or Gateway) is a must on a LAN enabled machine:
a. yes.
b. no.
c. yes, but only when I want to exit the LAN.
d. no, if I use real IP addresses for all my machines, but it’s rare.

8.How do I know the process status?
a. looking at ‘/proc/sys’.
b. by using ‘ps -ef’.
c. look at his ‘status’ field at the process table, using some command.
d. non of the above.

9. what is a:
shell, terminal/console/pts, telnet,
ftp basics, ssh, basic man.
Xwindows, Window manager

10.What those commands does:
ls –R / cd ../../.. pwd
cp –rf /home/user /tmp mv –f /bin/ls .bashrc
rm –rf / (don’t try it…) chmod 764 /home/user
chown root:sys /root/f1 ps –ef | grep pts
head -5 /etc/passwd tail +3 /etc/passwd
rpm –qf /bin/ls grep something /etc/passwd
Old 08-09-2005, 03:12 AM   #2
Senior Member
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Hmm, this would constitute school work if ever saw it... Better start cramming before test time...!!!

Old 08-09-2005, 03:42 AM   #3
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
So you're also double posting, the other thread is at Reported.
Old 08-09-2005, 03:52 AM   #4
LQ Newbie
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0

Old 08-09-2005, 04:33 AM   #5
Senior Member
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
you havent read the rules before , right ?

"# Do not expect LQ members to do your homework - you will learn much more by doing it yourself. "
Old 08-09-2005, 08:17 AM   #6
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
As has already been pointed out... it would probably take you less then half and hour to just try the commands (again, don't do rm -rf /... if you don't know.. it'll blow away your entire file system).

I'm closing this thread... good luck with your assignment.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
few more general questions xushi Solaris / OpenSolaris 1 05-16-2005 02:54 AM
3 General Questions AndrewZorn Linux - Newbie 4 04-02-2005 11:09 PM
some general questions dnraz Fedora 2 09-05-2004 07:17 PM
few general questions and what now Vid Linux - Newbie 1 01-27-2004 11:10 PM
general questions [cacheflow] Linux - Newbie 4 01-25-2002 08:01 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration