LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > LinuxQuestions.org > LinuxQuestions.org Member Intro
User Name
Password
LinuxQuestions.org Member Intro New to LinuxQuestions.org? Been a long time member but never made a post? Introduce yourself here.

Notices


Closed Thread
  Search this Thread
Old 05-16-2019, 02:44 PM   #1
anon200
LQ Newbie
 
Registered: May 2019
Posts: 4

Rep: Reputation: Disabled
Guys, I will really appreciate your help if you can help me get the answers to the following questions:


Q-1. One of your users has created a file called tmp (the command cat /etc/passwd > -tmp will do it). They want to delete it but can’t. Why might the user have difficulty removing this file? How would you remove it? You may have to refer to the online help section man pages to find the answer.

Q-2. What commands would you use to do the following:
a) View mkdir(2)
b) Find the command to print a file
c) Find out how many different manual pages exist for mkdir
d) Describe the contents of section 8 of the manual pages

Q-3. The following examples all work with the /etc/passwd file. /etc/passwd is the file that stores information about all the users of a UNIX machine. It is a text file with each line divided into seven fields. Each field is separated by a : character. Use the cat command to view the contents of the file.
a) sort /etc/passwd
sort in order based on the whole line
b) sort -r /etc/passwd
reverse the order of the sort
c) sort +2n -t: /etc/passwd
sort on third field,where field delimiter is: (skip the first two fields)

Q - 4. What command would you use to (assume you start from the original file for every question):
a) sort the file on the names
b) sort the file in descending order on phone number
c) display just the addresses
d) change all the! characters to:
e) display the first line from the file
f) display the line containing david’s information
g) What effect would the following command have paste-d: -sphone.book

Q-5. AUniversitystudentdatabasesystemmustproduceanumberoffilescontaininginformationaboutstudentsinaclass. One such example CSV file with 6 fields has the format: student number, surname, firstname, grade(F,P,C,D,HD), mark, degree code You may seek help from: http://infocom.cqu.edu.au/85321/Reso.../6/results.csv Using previous descriptions in the lecture, this text book and the Linux manual pages, come up with commands toper form the following tasks on this example file:
a) count the number of students in the class (hint: there is one student per line in the file)
b) display the data file one line at a time
c) get alis to fall the student numbers in the class
d) Find all students who received HDs
Using the above matrices,find the matrices that represent
 
Old 05-17-2019, 03:54 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,489

Rep: Reputation: Disabled
As per the other two threads!
 
  


Closed Thread



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
Guys, I will really appreciate your help if you can help me get the answers to the following questions: anon200 Linux - General 3 05-16-2019 03:52 PM
webmin n00b, really tired so I would really appreciate some help. xzx Linux - Software 10 07-04-2003 08:48 PM

LinuxQuestions.org > Forums > LinuxQuestions.org > LinuxQuestions.org Member Intro

All times are GMT -5. The time now is 05:04 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
Open Source Consulting | Domain Registration