LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-17-2019, 01:37 PM   #1
anon200
LQ Newbie
 
Registered: May 2019
Posts: 4

Rep: Reputation: Disabled
Problems related to the philosophy of linux commands


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 toprint 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: -s phone.book

Q-5. A University student database system must produce a number of files containing information about students in a class. 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 a list of all 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, 01:39 PM   #2
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Can you please stop posting homework or test questions disguised with different topics? Pretty sure these types of questions are not allowed per the posting guidelines.
 
Old 05-17-2019, 01:53 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,757

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
I thought you were 'sorry' before, OP?? The past 3 or 4 times you've posted this same stuff??

We **ARE NOT, WILL NOT** do your homework for you, period. Do you understand??? If you don't know how to answer the questions, then either read your textbook, ask your teacher, or actually try to LEARN SOMETHING ON YOUR OWN. What do you think is going to happen after you're spoon-fed answers to everything?? You won't know anything, and be even further behind than you are already, due to plain laziness.

You are not making your life easier by doing this, but making it harder.

Last edited by TB0ne; 05-17-2019 at 01:55 PM.
 
Old 05-17-2019, 01:54 PM   #4
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
I reported the last post. Obviously single brain celled troll...:-)
 
1 members found this post helpful.
Old 05-18-2019, 03:55 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
not sure what you mean by "last post", but i reported the OP (original post).
can't believe this user's threads (there's at least one more very similar to this) aren't locked yet.
where are those vigilant moderators when they're really required?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Kubernetes for data scientists, Linux philosophy, troubleshooting hardware problems, Python, and more LXer Syndicated Linux News 0 01-08-2019 10:51 PM
git "philosophy" understanding problems - no central server? Squall90 Programming 3 08-19-2010 09:49 AM
Philosophy of Linux and Linux users (return of the 2004 thread) davoman General 20 04-30-2007 05:55 AM
Philosophy of Linux and Linux people davoman General 21 06-26-2004 12:55 PM
Linux Philosophy perry Linux - Newbie 4 11-03-2003 11:13 AM

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

All times are GMT -5. The time now is 09:50 PM.

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