Write to file forbidden

GaryT taig at melbpc.org.au
Mon Mar 16 14:48:02 UTC 2009

Charlie Kravetz wrote:
> On Mon, 16 Mar 2009 00:47:11 +1100 GaryT wrote:
> To obtain a recursive listing of all files, I'll use the command
> 	ls -s -S -R
> from the root directory.
> 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?
> 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,
Much appreciated, Charlie.
The learning continues.

More information about the ubuntu-users mailing list