Write to file forbidden
Charlie Kravetz
cjk at teamcharliesangels.com
Sun Mar 15 14:26:11 UTC 2009
On Mon, 16 Mar 2009 00:47:11 +1100
GaryT <taig at melbpc.org.au> wrote:
> To obtain a recursive listing of all files, I'll use the command
> ls -s -S -R
> from the root directory.
>
> 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
>
> adding sudo makes no difference
> using gksudo also makes no difference.
>
> please, how does one overcome the problem?
> TIA
> Gary T
>
If you are running this in "/", you do not have write permission to
create 'files.txt'. Try using
sudo ls -s -S -R >/home/your-user-name/files.txt
replacing your-user-name with the correct name. This will allow a full
listing to be generated and the report written to your home directory.
Good luck,
--
Charlie Kravetz
Linux Registered User Number 425914 [http://counter.li.org/]
Never let anyone steal your DREAM. [http://keepingdreams.com]
More information about the ubuntu-users
mailing list