LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


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

Rep: Reputation: 0
Some basic Questions in Linux


Hi, might someone help me with some basic questions in Linux?

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:29 AM   #2
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
Trying to get your homework done, eh? You could find answers for these from man pages and/or Google searches. Read the rules: http://www.linuxquestions.org/rules.php
 
Old 08-09-2005, 03:43 AM   #3
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 153Reputation: 153
Try the commands and see, except for the `rm -rf /` which it tells you not to try anyway
 
Old 08-09-2005, 01:49 PM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
The Rules you signed up to state:
Quote:
Do not expect LQ members to do your homework - you will learn much more by doing it yourself.
. And so this thread is closed.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New to linux, Basic questions sider69 Linux - Newbie 6 09-26-2005 03:06 AM
Basic questions on LinuX lionelx Linux - General 5 09-27-2004 12:24 PM
Basic questions on LinuX lionelx Linux - Newbie 3 09-27-2004 11:52 AM
A Few Basic Linux Questions... cabrone Linux - Newbie 7 09-15-2003 07:19 AM
Basic linux questions karlan Linux From Scratch 0 08-08-2003 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:31 AM.

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