Command help

Patton Echols p.echols at comcast.net
Thu Aug 11 05:43:45 UTC 2011


On 08/10/2011 10:18 PM, nathan nolast wrote:
> can someone please inform me how this works
>
> > filename.txt
>
> this emptys the file but i cant find what > is doing, what is >

the > symbol puts the output of the command into the file.  So try this

$echo "here is some text to try out"

Then try this:

$echo "here is some text to try out" > testfile.txt

Examine the file.  Now try two more things:

$echo "this text should replace what was in the file" > testfile.txt

$echo "this text should NOT replace what was in the file before" >> 
testfile.txt

Enjoy

--PE

>
> -- 
> Thank you for your time
> ~Nathan
> nathan1465 at gmail.com <mailto:nathan1465 at gmail.com>
>
> *Please consider the environment before printing this email. *
>
> This message contains confidential information and is intended only 
> for the individual named. If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail. Please notify 
> the sender immediately by e-mail if you have received this e-mail by 
> mistake and delete this e-mail from your system.
>





More information about the ubuntu-users mailing list