Linked Questions

9
votes
4answers
5k views

How to redirect stderr,out to different files and also display in terminal?

To make it clear, I want to see the output of a command in the terminal as if there were no redirection. Also stderr need to be redirected to err.log and stdout need to be redirected to stdout.log. ...
8
votes
3answers
497 views

Execute a line of commands with one sudo

For example if I want to create a file and enter text in one line I can redirect the output into a file with the use of the > operator: echo "something" > /path/foobar but if I don't have ...
7
votes
4answers
1k views

sudo permission denied but su grants permission

this is the first occurrence where su was required for me. I read an article about changing the value in /sys/devices/virtual/backlight/acpi_video0/brightness to alter my laptop's screen brightness. ...
7
votes
2answers
752 views

How do I append text to a write protected file [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on I am trying to append a line of text to a write protected file. I tried to accomplish this with sudo ...
6
votes
1answer
3k views

Why can't sudo redirect stdout to /etc/file, but sudo 'nano' or 'cp' can?

Why does redirection, using sudo give me an error for the following commands? $ sudo printf "foo" >/etc/file bash: /etc/file: Permission denied $ sudo printf "foo" ~/file; cat ~file ...
5
votes
2answers
5k views

tail program output to file in Linux

I know we can use below format to redirect the screen output to a file: $ your_program > /tmp/output.txt However when I used below command, it says "-bash: /home/user/errors.txt: Permission ...
5
votes
3answers
5k views

bash: /dev/stderr: Permission denied

After upgrading to a new release version, my bash scripts start spitting errors: bash: /dev/stderr: Permission denied in previous versions Bash would internally recognize those file names (which is ...
4
votes
4answers
655 views

where should I put the sudo in this command? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on echo "some words" >> /etc/apt/source.list permission denied sudo echo "some words" >> ...
3
votes
2answers
237 views

insert text in a file using echo command [duplicate]

I am trying to insert some text in a file in the following way sudo echo "abc-abc/abc/abc" >> /etc/portage/make.conf but it give me the error Permission denied although I am using sudo ...
3
votes
1answer
230 views

Redirecting output in the shell, permissions

I have a question about permissions. Distro: Debian GNU/Linux 6.0.4 (squeeze) So I have a folder with a php script in it. Both folder and file are owned by User1 If I do this: php script.php I ...
3
votes
1answer
1k views

Ubuntu 11.04 and large external drives

I have a Hitachi USB external 3 terabyte drive attached to a Dell Precision T1500. When connected to the computer running Ubuntu 11.04 (2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:17:25 UTC 2011 ...
2
votes
3answers
795 views

How do I use redirection with sudo [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on Yeah I could (and probably will) just escalate to root, but I'd like to know why this doesn't work? ...

15 30 50 per page