Re: Write to file forbidden
- From: Nils Kassube <kassube@xxxxxxx>
- Date: Sun, 15 Mar 2009 15:30:57 +0100
GaryT wrote:
To obtain a recursive listing of all files, I'll use the command
ls -s -S -R
from the root directory.
That would be nearly all files - hidden files would stay hidden. If you
want to see ALL files, add the -A option.
BUT
When attempting to capture that list by saving it to a text file, I
get "permission denied"
e.g. ls -s -S -R >files.txt
You are not allowed to write to "/files.txt".
adding sudo makes no difference
No, it doesn't because sudo then only works for the ls command, not for
the output redirection. Try
sudo ls -sSR / >~/files.txt
which will give you a list of all files but place the output in your
home directory.
using gksudo also makes no difference.
There is no big difference between sudo and gksudo in this case because,
like sudo, it operates on the ls command not on the output redirection.
Nils
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Follow-Ups:
- Re: Write to file forbidden
- From: GaryT
- Re: Write to file forbidden
- References:
- Write to file forbidden
- From: GaryT
- Write to file forbidden
- Prev by Date: Re: Write to file forbidden
- Next by Date: Re: Python error interpretation
- Previous by thread: Re: Write to file forbidden
- Next by thread: Re: Write to file forbidden
- Index(es):
Relevant Pages
|