Differences between version 8 and previous revision of IORedirectionNotes.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 8 | Last edited on Friday, July 13, 2007 1:07:23 pm | by BenStaz | Revert |
Older page: | version 7 | Last edited on Monday, December 11, 2006 8:49:40 pm | by BenStaz | Revert |
@@ -5,9 +5,11 @@
Firstly:
*sudo echo "#TEST REPOSITORY" >> /etc/apt/sources.list
-Results in a "Permission denied error". This is because anything after
the IO redirection characters (
''>>''),
is inside a new subshell
which is executed as
you and not root. ie: sudo only applies to the echo command
.
+Results in a "Permission denied error". This is because sudo spawns a new subshell and doesn't get
the ''>> /etc/apt/sources.list
'' because it
is owned by the parent shell
which is you.
+
+
Ways around this:
1)