LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-08-2005, 05:30 AM   #1
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Rep: Reputation: 30
regarding "cat" caommand


Hi All...

In "cat" command what is the difference between options ">" and ">>"
 
Old 01-08-2005, 05:31 AM   #2
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Original Poster
Rep: Reputation: 30
Any help would be appreciate...

thnx in advance...

zameer
 
Old 01-08-2005, 06:39 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
> redirects output of the given command to the named file. If the file already exists, the contents will be overwritten.
>> redirects output of the given command as an append to the filename (added to the end of the file; not overwritten).
 
Old 01-08-2005, 06:45 AM   #4
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Original Poster
Rep: Reputation: 30
thnx bigrigdriver...

U gave a wonderful , nice , gr8 and Descriptive explanation.. I understand now the difference between these two...
 
Old 02-25-2006, 06:25 PM   #5
goldustf
LQ Newbie
 
Registered: Feb 2006
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by zameer_india
Hi All...

In "cat" command what is the difference between options ">" and ">>"

Pretty simple....if you are adding someting to directory and you do not want to overrwrite previous entries, use the >>, thay way you only append to the file/directory(add to, in sequence.
 
Old 02-25-2006, 08:36 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by goldustf
Pretty simple....if you are adding someting to directory and you do not want to overrwrite previous entries, use the >>, thay way you only append to the file/directory(add to, in sequence.
No---sorry.
These are redirection operators associated with files--not directories.
 
  


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
Terminal Questions? "cat /dev/tty1" Why Not? chris318 Linux - Security 1 02-25-2005 10:57 PM
Terminal Questions? "cat /dev/tty1" Why Not? chris318 Linux - Newbie 3 02-24-2005 11:59 PM
V4L: "cat /dev/video0: no such device"; to be sure not supported? jago25_98 Linux - Hardware 1 01-27-2005 05:04 PM
bash redirection "$ cat << EOF > file" (how does this work) ninmonkeys Linux - General 1 11-09-2004 04:37 PM
Something similar to "cat /proc/device" under Linux? BSlack Solaris / OpenSolaris 4 12-17-2003 05:40 AM


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