Godlike Productions - Discussion Forum
Users Online Now: 2,129 (Who's On?)Visitors Today: 528,735
Pageviews Today: 843,689Threads Today: 340Posts Today: 5,277
09:04 AM


Rate this Thread

Absolute BS Crap Reasonable Nice Amazing
 

Urgent help on Linux

 
Anonymous Coward
User ID: 13025083
United States
03/10/2013 05:07 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
way over my head
/home/msabbar/sample_dir2
`-- sample_dir
|-- admin
|-- cambridge
| |-- cafeteria
| |-- library
| `-- security
| |-- annex
| |-- building
| `-- parking
|-- faculty
|-- history.exe
|-- markham
| |-- annex
| |-- building1
| `-- parking
`-- stenton
|-- gen_ed
| |-- Holidays
| `-- cars2
`-- lib_arts
|-- english.txt
`-- match.doc

11 directories, 11 files

Your current directory is stenton. Copy the first 300 lines of file
~bto120/phones to a new file called phone_directory in stenton. This file
contains phone number and location information, sorted by last name, which
is the first field in each record.

any ideas guys?
 Quoting: IMAX
Anonymous Coward
User ID: 13025083
United States
03/10/2013 05:09 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
how about you go to puppy linux lucid and fedora 17 to figure it out, so easy a widows user could figure it out
way over my head
/home/msabbar/sample_dir2
`-- sample_dir
|-- admin
|-- cambridge
| |-- cafeteria
| |-- library
| `-- security
| |-- annex
| |-- building
| `-- parking
|-- faculty
|-- history.exe
|-- markham
| |-- annex
| |-- building1
| `-- parking
`-- stenton
|-- gen_ed
| |-- Holidays
| `-- cars2
`-- lib_arts
|-- english.txt
`-- match.doc

11 directories, 11 files

Your current directory is stenton. Copy the first 300 lines of file
~bto120/phones to a new file called phone_directory in stenton. This file
contains phone number and location information, sorted by last name, which
is the first field in each record.

any ideas guys?
 Quoting: IMAX

 Quoting: Anonymous Coward 13025083
Anonymous Coward
User ID: 1339701
United States
03/10/2013 05:09 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
so far so good...i can answer the rest of te questions

this one was confusing not just me , but for many

if i had another question ... ill post one
tomato
 Quoting: IMAX


It is confusing because it uses an undocumented form of the command as the "correct" answer. You would've had it correct a long time ago if not for that.
Anonymous Coward
User ID: 13025083
United States
03/10/2013 05:10 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
*windows sorry
how about you go to puppy linux lucid and fedora 17 to figure it out, so easy a widows user could figure it out
way over my head
/home/msabbar/sample_dir2
`-- sample_dir
|-- admin
|-- cambridge
| |-- cafeteria
| |-- library
| `-- security
| |-- annex
| |-- building
| `-- parking
|-- faculty
|-- history.exe
|-- markham
| |-- annex
| |-- building1
| `-- parking
`-- stenton
|-- gen_ed
| |-- Holidays
| `-- cars2
`-- lib_arts
|-- english.txt
`-- match.doc

11 directories, 11 files

Your current directory is stenton. Copy the first 300 lines of file
~bto120/phones to a new file called phone_directory in stenton. This file
contains phone number and location information, sorted by last name, which
is the first field in each record.

any ideas guys?
 Quoting: IMAX

 Quoting: Anonymous Coward 13025083

 Quoting: Anonymous Coward 13025083
Anonymous Coward
User ID: 1339701
United States
03/10/2013 05:15 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
*windows sorry
how about you go to puppy linux lucid and fedora 17 to figure it out, so easy a widows user could figure it out
way over my head
/home/msabbar/sample_dir2
`-- sample_dir
|-- admin
|-- cambridge
| |-- cafeteria
| |-- library
| `-- security
| |-- annex
| |-- building
| `-- parking
|-- faculty
|-- history.exe
|-- markham
| |-- annex
| |-- building1
| `-- parking
`-- stenton
|-- gen_ed
| |-- Holidays
| `-- cars2
`-- lib_arts
|-- english.txt
`-- match.doc

11 directories, 11 files

Your current directory is stenton. Copy the first 300 lines of file
~bto120/phones to a new file called phone_directory in stenton. This file
contains phone number and location information, sorted by last name, which
is the first field in each record.

any ideas guys?
 Quoting: IMAX

 Quoting: Anonymous Coward 13025083

 Quoting: Anonymous Coward 13025083

 Quoting: Anonymous Coward 13025083



Can you do this on Windows?

find all files containing the string XXX and replace that string with YYY and make backup copies of each file and also make a list of files changed.

find . -type f -exec grep -l XXX {} \;|tee /tmp/fileschanged|xargs perl -pi.bak -e 's/XXX/YYY/g'
IMAX  (OP)

User ID: 35675988
Canada
03/10/2013 05:36 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
okay so now i cant find this one

Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:



i did:
cat phone_directory | more | tail -k > Bruce Byce

didn't work

what command should i use to stop at Bruce Byce
?
Imagine if there was no country
Stop the Sabre Rattlings and Wars
Anonymous Coward
User ID: 1339701
United States
03/10/2013 05:37 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
okay so now i cant find this one

Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:



i did:
cat phone_directory | more | tail -k > Bruce Byce

didn't work

what command should i use to stop at Bruce Byce
?
 Quoting: IMAX


more phone_directory
Anonymous Coward
User ID: 33568463
Belgium
03/10/2013 05:40 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
okay so now i cant find this one

Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:
 Quoting: IMAX

"less phone_directory"
then use "/" to start searching and type "Bruce Byce" to find the line containing that name; use "q" to quit.
Anonymous Coward
User ID: 1339701
United States
03/10/2013 05:41 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
okay so now i cant find this one

Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:
 Quoting: IMAX

"less phone_directory"
then use "/" to start searching and type "Bruce Byce" to find the line containing that name; use "q" to quit.
 Quoting: Anonymous Coward 33568463


more or less, depending on OP's assignment software
Anonymous Coward
User ID: 33568463
Belgium
03/10/2013 05:41 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
or simply "cat phone_directory|grep "Bruce Byce"...
Anonymous Coward
User ID: 35769388
Australia
03/10/2013 05:46 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
okay so now i cant find this one

Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:



i did:
cat phone_directory | more | tail -k > Bruce Byce

didn't work

what command should i use to stop at Bruce Byce
?
 Quoting: IMAX


need more cats!

cat phone_directory | cat | cat | cat | cat | cat | cat | cat | more
IMAX  (OP)

User ID: 35675988
Canada
03/10/2013 05:50 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
okay so now i cant find this one

Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:
 Quoting: IMAX

"less phone_directory"
then use "/" to start searching and type "Bruce Byce" to find the line containing that name; use "q" to quit.
 Quoting: Anonymous Coward 33568463


should i use pipe '|' when i want to quit?

Last Edited by IMAX on 03/10/2013 05:52 PM
Imagine if there was no country
Stop the Sabre Rattlings and Wars
Anonymous Coward
User ID: 35096685
United States
03/10/2013 05:54 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
i even did this
head -n 300 ~bto120/phones | sort > phone_directory

and;
head -n 300 ~/bto120/phones | sort > phone_directory

and ;
head -n 300 ~bto120/phones | sort >> phone_directory

and;

head -n 300 ~/bto120/phones | sort > phone_directory

and ;
head -n 300 ~/bto120/phones | sort >> phone_directory


and still nothing
 Quoting: IMAX


Try it without the -n. The assignment software might not have all of the correct possibilities. Drop the sort since the assignment software might not like that.

Get on a Linux command line and try it if you really want to learn.
 Quoting: Anonymous Coward 1339701


YESSSSSS

You = Genius

head -300 ~bto120/phones > phone_directory
is the answer
 Quoting: IMAX


No, it is not confusing at all! Go back and tell the place you are taking the course that their software is a steaming pile of horse shit! Tell them, "In the wild or in noted version of Linux or UNIX....to simply run, "head -300" would end up a total fucking failure. Tell the dumb shits that the "-n" (aka 'dash n') command line argument is not optional...it is the general way that "shit" gets done in the real world. If they do not like that answer...tell them (and I do not say this jokingly), "Go fuck yourselves...you are too stupid to be teaching computer courses...you might want to put on-line basket weaving courses instead!"
Anonymous Coward
User ID: 33568463
Belgium
03/10/2013 05:54 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
okay so now i cant find this one

Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:
 Quoting: IMAX

"less phone_directory"
then use "/" to start searching and type "Bruce Byce" to find the line containing that name; use "q" to quit.
 Quoting: Anonymous Coward 33568463

should i use pipe '|' when i want to quit?
 Quoting: IMAX

i am simply quoting the above, so you can reread it. thoroughly.
IMAX  (OP)

User ID: 35675988
Canada
03/10/2013 05:55 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
cuz i'm doing

less phone_directory | grep "Bruce Byce"
still tells me to try again...it's weird

it tells me to make not of his phone number , 'then' quit
the comman..!!!
Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:

i think i'm doing it right... i didn't learn it any other way

Last Edited by IMAX on 03/10/2013 05:56 PM
Imagine if there was no country
Stop the Sabre Rattlings and Wars
Anonymous Coward
User ID: 35769388
Australia
03/10/2013 05:56 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
okay so now i cant find this one

Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:
 Quoting: IMAX

"less phone_directory"
then use "/" to start searching and type "Bruce Byce" to find the line containing that name; use "q" to quit.
 Quoting: Anonymous Coward 33568463


should i use pipe '|' when i want to quit?
 Quoting: IMAX


no, you should use 'q' like he said.

HOW TO SOLVE ALL THESE PROBLEMS:

1. Read the question

2. Understand the question

3. Do a web search, for example "linux display one page at a time". (obviously this changes each question, see previous 2 steps)

4. Find the command that can "display one page at a time" or whatever the current question says. The web search will indicate that "more" or "less" can do this.

5. Read the manual page so that you know how to use those commands: man more; man less

6. Did you skip reading the manual page??? GO BACK AND READ THE MANUAL PAGE!!!

7. Try out the commands to make sure you know how they work

8. Type in the correct command

9. Bask in the happy feelings you got from figuring it out!
Anonymous Coward
User ID: 33568463
Belgium
03/10/2013 05:56 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
No, it is not confusing at all! Go back and tell the place you are taking the course that their software is a steaming pile of horse shit! Tell them, "In the wild or in noted version of Linux or UNIX....to simply run, "head -300" would end up a total fucking failure. Tell the dumb shits that the "-n" (aka 'dash n') command line argument is not optional...it is the general way that "shit" gets done in the real world. If they do not like that answer...tell them (and I do not say this jokingly), "Go fuck yourselves...you are too stupid to be teaching computer courses...you might want to put on-line basket weaving courses instead!"
 Quoting: Anonymous Coward 35096685

linux does not follow the posix standards.
Anonymous Coward
User ID: 35769388
Australia
03/10/2013 05:56 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
cuz i'm doing

less phone_directory | grep "Bruce Byce"
still tells me to try again...it's weird

it tells me to make not of his phone number , 'then' quit
the comman..!!!
Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:
 Quoting: IMAX


less phone_directory

then press "space" until you find Bruce

then make a note of his number

then press "q"
Cambrie

User ID: 30869400
United States
03/10/2013 05:58 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
or simply "cat phone_directory|grep "Bruce Byce"...
 Quoting: Anonymous Coward 33568463


^THIS except quotes only around the search term since it is two words:

cat phone_directory | grep "Bruce Byce"
IMAX  (OP)

User ID: 35675988
Canada
03/10/2013 06:01 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
cuz i'm doing

less phone_directory | grep "Bruce Byce"
still tells me to try again...it's weird

it tells me to make not of his phone number , 'then' quit
the comman..!!!
Your current directory is stenton. Display phone_directory one screen at
a time, until you find the record for 'Bruce Byce'. Make a note of his
4-digit telephone extension (you'll need it for the next question), then
quit the command:
 Quoting: IMAX


less phone_directory

then press "space" until you find Bruce

then make a note of his number

then press "q"
 Quoting: Anonymous Coward 35769388


^^This
Imagine if there was no country
Stop the Sabre Rattlings and Wars
Anonymous Coward
User ID: 35769388
Australia
03/10/2013 06:02 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
or simply "cat phone_directory|grep "Bruce Byce"...
 Quoting: Anonymous Coward 33568463


^THIS except quotes only around the search term since it is two words:

cat phone_directory | grep "Bruce Byce"
 Quoting: Cambrie


needs more cats!!!

cat phone_directory | cat | cat | cat | cat | cat | cat | grep "Bruce Byce"
IMAX  (OP)

User ID: 35675988
Canada
03/10/2013 06:03 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
or simply "cat phone_directory|grep "Bruce Byce"...
 Quoting: Anonymous Coward 33568463


^THIS except quotes only around the search term since it is two words:

cat phone_directory | grep "Bruce Byce"
 Quoting: Cambrie


needs more cats!!!

cat phone_directory | cat | cat | cat | cat | cat | cat | grep "Bruce Byce"
 Quoting: Anonymous Coward 35769388


hey Aussie dude...you are way smart for this
thanks for your help

and thank you belgium AC for the help as well
Imagine if there was no country
Stop the Sabre Rattlings and Wars
Cambrie

User ID: 30869400
United States
03/10/2013 06:03 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
or simply "cat phone_directory|grep "Bruce Byce"...
 Quoting: Anonymous Coward 33568463


^THIS except quotes only around the search term since it is two words:

cat phone_directory | grep "Bruce Byce"
 Quoting: Cambrie


needs more cats!!!

cat phone_directory | cat | cat | cat | cat | cat | cat | grep "Bruce Byce"
 Quoting: Anonymous Coward 35769388


banana2
IMAX  (OP)

User ID: 35675988
Canada
03/10/2013 06:06 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
if i want move back to a parent directory
shouldn't i do

..

?

Last Edited by IMAX on 03/10/2013 06:07 PM
Imagine if there was no country
Stop the Sabre Rattlings and Wars
Anonymous Coward
User ID: 35769388
Australia
03/10/2013 06:07 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
hey Aussie dude...you are way smart for this
thanks for your help

and thank you belgium AC for the help as well
 Quoting: IMAX


TOP TIP FOR USING Linux and UNIX(TM):

READ THE MANUAL!!!

You cannot remember every detail of every command on every type of UNIX and Linux system! However, the manual should be supplied with each system. Therefore, read the manual, and you will learn much stuff!!!

"man" should be your most used command!

man more
man less
man grep
man ls
man cat
man dog
man eating shark

all these are valid commands!!! you should try them!!!!
Anonymous Coward
User ID: 35769388
Australia
03/10/2013 06:07 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
if i want to go back to one directory
shouldn't i do

..

?
 Quoting: IMAX


NO! .. isn't a command! (hopefully)

cd is a command to change directories!!!
Cambrie

User ID: 30869400
United States
03/10/2013 06:09 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
if i want move back to a parent directory
shouldn't i do

..

?
 Quoting: IMAX


cd ..

You should make a text file for yourself and keep it on your desktop. Add new commands as you learn them. Review commands often until you no longer need to reference them.
Fred
User ID: 35605840
United States
03/10/2013 06:13 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
Please!

head -n 300 ~bto120/phones > my_new_file.txt
 Quoting: Anonymous Coward 35096685


Correct :-)
Anonymous Coward
User ID: 33568463
Belgium
03/10/2013 06:14 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
less phone_directory

then press "space" until you find Bruce

then make a note of his number

then press "q"
 Quoting: Anonymous Coward 35769388

^^This
 Quoting: IMAX

while using "less", you can use "/" to search for things in a linear fashion. just type "/" followed immediately by your search string, and then hit enter.
IMAX  (OP)

User ID: 35675988
Canada
03/10/2013 06:16 PM
Report Abusive Post
Report Copyright Violation
Re: Urgent help on Linux
if i want to go back to one directory
shouldn't i do

..

?
 Quoting: IMAX


NO! .. isn't a command! (hopefully)

cd is a command to change directories!!!
 Quoting: Anonymous Coward 35769388


oh silly me

if i want to display all files within a directory
(and it's sub dir) that are larger than 10k byts

should i use cat sample_dir | -n 10 tail
?
Display all the files within sample_dir
(and it's subdirectories) that are larger than 10k bytes:
Imagine if there was no country
Stop the Sabre Rattlings and Wars





GLP