Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

very basic unix question

Status
Not open for further replies.

786snow

Programmer
Nov 12, 2006
75
Hi,

I am trying to send grep results to the file test.tx but it gives me the following message.


grep -r "Etrade" . > test.txt
ksh: cannot create test.txt: Permission denied

Then when I created the file text.txt manually and tried to send the results to the text.txt like the folllowing, same thing happened again.

grep -r "Etrade" . > test.txt
ksh: cannot create test.txt: Permission denied


 
Hi,
It's only that you can't write in the directory you are on. Try to redirect the output to a directory you can write like /tmp
Code:
grep -r "Etrade" . > /tmp/test.txt
What file have you created manually and wher ? text.txt or test.txt

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top