LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-24-2011, 10:46 AM   #1
raj.knd
LQ Newbie
 
Registered: Aug 2010
Location: Bangalore
Posts: 4

Rep: Reputation: 0
need answer of following few questions...


1. How can you find all first level subdirectories under the current directory?

2. How will you show the last 100 lines of the file "foo.log"?

3. How will you Stream the contents of a the log file "foo.log" as it gets written to?

4. How can you grep for a pattern on a gzip'ed file? e.g., find "foo" in bar.gz

5. Find all lines in the file "foo" which DON'T have the pattern "bar"

6. Your web server is running very slowly. If you can login to the server, what command will you run to find out cpu and memory use?

7. Extract the file foo which is a part of the tar'ed, gzip'ed file bar.tar.gz

8. You attach a usb disk to your linux desktop, but it does not show up. How can you get more information about the error?

9. What is the secure way to login to remote systems?

10. What is the difference between TELNET and SSH?

11. Given a file 'a' with the following permissions

-rwxrwxrwx 1 rohit rohit 0 2011-01-24 13:30 a

Change its permissions such that it is only readable and writable by its
owner, not accessible by anybody else in the group and only executable
by the world


12. Difference between using ' and " for quoting a string / command in a shell

13. In the attached text file (test.txt) replace all occurrences of 'red' with 'yellow' without using an editor (i.e. from the command line)

14. How would you suppress output written to stderr by a command

15. Meaning of the #! notation in scripts e.g. #!/bin/sh

16. What is the output of the attached shell script test.sh




Scripting questions, all based on the attached file access.log. Use one of
perl, python, ruby, or shell scripts to solve these questsions. If any answer
is obtained using just the command line, please include those commands as well.


17. How many accesses were made between 10am and 11.30am on Jan 24, 2011?

18. How many unique IP addresses accessed this server?

19. For every IP address which accessed this server, output a report showing number of hits for every type of HTTP status. For e.g., IP 192.168.1.20 has 164 hits with status 404 and 1690 hits with status 200.
Attached Files
File Type: txt test.txt (34 Bytes, 9 views)
 
Old 01-24-2011, 10:49 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,497

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Homework?

Kind regards
 
Old 01-24-2011, 10:49 AM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Surely if you had attended class you would know the answers to all of these very basic questions.

Hint: question 10 contains the answer to question 9.
 
Old 01-24-2011, 10:50 AM   #4
darkduck
Member
 
Registered: Jan 2011
Location: London
Distribution: Mageia, Debian
Posts: 482

Rep: Reputation: 26
homework?
 
Old 01-24-2011, 10:50 AM   #5
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,482

Rep: Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890
You can't be serious???

This is not - www.answer_all_my_homework_questions.org

How about you answer all the questions and then ask questions about where you are stuck. One would think you are doing a course to learn something ... not just get told
all the answers.
 
Old 01-24-2011, 10:56 AM   #6
darkduck
Member
 
Registered: Jan 2011
Location: London
Distribution: Mageia, Debian
Posts: 482

Rep: Reputation: 26
Quote:
Originally Posted by grail View Post
You can't be serious???

This is not - www.answer_all_my_homework_questions.org

How about you answer all the questions and then ask questions about where you are stuck. One would think you are doing a course to learn something ... not just get told
all the answers.
Offtopic: http://www.answer-all-my-homework-questions.org/ is still available for registration. As well as .com, .co.uk, .org.uk versions.
Who does want to register those names?
 
Old 01-24-2011, 11:00 AM   #7
raj.knd
LQ Newbie
 
Registered: Aug 2010
Location: Bangalore
Posts: 4

Original Poster
Rep: Reputation: 0
yes its home work...i know only few answers..im a begineer in linux..i dont no how to install or extract a software in linux..so i need few help..sorry for posting such questions...
 
Old 01-24-2011, 11:50 AM   #8
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,446

Rep: Reputation: 2537Reputation: 2537Reputation: 2537Reputation: 2537Reputation: 2537Reputation: 2537Reputation: 2537Reputation: 2537Reputation: 2537Reputation: 2537Reputation: 2537
Quote:
Originally Posted by raj.knd View Post
yes its home work...i know only few answers..im a begineer in linux..i dont no how to install or extract a software in linux..so i need few help..sorry for posting such questions...
First, it's against LQ rules here to post verbatim homework questions. Second, those questions are covered in your texts and coursework. Most importantly...show some effort of your own...try to look things up. YOU are supposed to be learning this stuff, not getting others to spoon-feed you the answers, because you're too lazy to look them up yourself.

We are always happy to HELP you if you're stuck, or if you don't understand an answer, but asking us to answer your homework for you is a different matter.
 
Old 01-25-2011, 01:47 AM   #9
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,482

Rep: Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890
So is your real question now how to install linux so you can do your homework?

If so, please explain where you are stuck?
 
  


Reply


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
Please answer for this questions.... infovijay Linux - General 1 10-31-2009 06:42 AM
questions you can`t answer ;-) greenthing Linux - Software 2 02-06-2005 07:52 AM
Two questions I never get an answer to J_Szucs Linux - General 5 04-23-2004 11:22 PM
Many questions that need an urgent answer! squall14716 Linux - General 7 10-03-2003 04:52 PM


All times are GMT -5. The time now is 04:30 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration