I'm currently studying shell commands, one of the exercises consists in creating a structure with various directories and subdirectories.
I wrote ls -laR > hello
, it was supposed to create a text file named hello
.
However, I get the following message bash: hello: permission denied
, even when I type sudo in the beginning.
The command worked in another Linux distribution.
Also, I used a few minutes ago ls -la
in the directory where I want to create the file and it gave me this:
drwxr-xr-x 2 root root 4096 Nov 26 10:56 .
drwxr-xr-x 5 root root 4096 Nov 26 10:56 ..
According to the first triad I have writing privileges?
ls -laR > hello
works on my Ubuntu if I issue it in my home dir. Best you can do is show us the permissions of the directory you are in :)echo $USER $PWD
?