LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 09-08-2013, 06:04 AM   #1
somilsharma8
LQ Newbie
 
Registered: Sep 2013
Posts: 3

Rep: Reputation: Disabled
unable to save my progress on the terminal


hey guys, i'm a beginner at linux and i'm learning about it from a book called "Running Linux"(O.Reilly Publications). It was going real smooth but now i'm stuck at the part where i save my output :/ the command, "ls /home/user >> `/Name" is not running as expected.... what am i doing wrong?
 
Old 09-08-2013, 08:03 AM   #2
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Back to Debian, and only Debian.
Posts: 1,142
Blog Entries: 7

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Well, from a quick glance, you're trying to redirect the output of the ls command to a file called "Name" in your root directory. Only root (should) be able to modify files and directories there. You should have received an error message; when I try I get:

Code:
anthony@serenity:~$ ls /home/anthony >> /Name
bash: /Name: Permission denied
It's not a good idea to save files in /. Nothing's likely to happen, but then it looks like a mess like on other operating systems (ahem, Windows, why do you insist on saving Update Installtion, and other logs in C:\???).

Your other problem is if you are not replacing "/home/user" with your own directory, if in fact you typed into the terminal exactly what you described.

You must remember when following examples from books, the web, &c.; that certain words (usually boldface in books, or some other distinct type) are to be replaced with your own username, filename, etc.
 
1 members found this post helpful.
Old 09-08-2013, 08:21 AM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,675
Blog Entries: 10

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Quote:
Originally Posted by somilsharma8 View Post
"ls /home/user >> `/Name" is not running as expected.... what am i doing wrong?
Perhaps you meant
Code:
ls /home/user >> ~/Name
but bash ~/Name would NOT run ls -al /home/user but just give you the ls output.

If you wish to run /home/user/Name and have it run like ls -al /home/user then use
Code:
echo "ls -al /home/user" >> ~/Name
bash ~/Name
 
2 members found this post helpful.
Old 09-08-2013, 08:55 AM   #4
somilsharma8
LQ Newbie
 
Registered: Sep 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
thanks Habitual, your suggestion really helped...... the thing is that i've been following the content in the book religiously and its been correct so far..... anyway, thanks a ton you guys
 
Old 09-08-2013, 09:07 AM   #5
somilsharma8
LQ Newbie
 
Registered: Sep 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
One more thing, I don't think I understand the functioning of
Quote:
echo "ls -al /home/user" >> ~/Name
bash ~/Name
can you break it down for me?
 
Old 09-08-2013, 09:16 AM   #6
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Back to Debian, and only Debian.
Posts: 1,142
Blog Entries: 7

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Quote:
Originally Posted by Habitual View Post
Perhaps you meant
Code:
ls /home/user >> ~/Name
but bash ~/Name would NOT run ls -al /home/user but just give you the ls output.[/CODE]
Man, that backtick in the OP was so small on my screen, I didn't even see that typo. Oops!
 
  


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
save terminal to database jrahma Linux - Newbie 15 11-06-2011 12:36 PM
how to copy a directory (local) from terminal with progress bar showing Linux.Girl Linux - Newbie 6 08-19-2010 11:00 AM
copy at terminal with progress bar. DoME69 Programming 6 03-10-2009 02:41 PM
Very good install... I want to save my progress this far.. hesees Debian 2 09-22-2008 02:07 AM
Terminal size (How to save??) sevvy8 Linux - Software 2 08-16-2004 07:21 PM


All times are GMT -5. The time now is 04:07 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