Creating a file with touch, and having it placed in a new directory doesn't have permissions

hello im running opensuse tumbleweed and i am having a problem trying to create a new file in my home directory with touch, then have it placed in the sub-directory ‘hello’

here is the syntax
$ touch hello1 /hello
i am getting this permissions error…
touch: cannot touch '/hello': Permission denied

Sorry I am new OpenSUSE so I don’t know how some of this stuff works.

Thank you :slight_smile:

edit: I am looking in the Users with yast2, maybe I need to be part of some group but I don’t know which one to pick.

Hi, so the command would be touch directory/filename, so in your case touch hello/hello1

Your command is looking for a directory called /hello which doesn’t exist…

1 Like

Ok that did the trick!
Thank you for your help, and for the fast reply.

That’s because you’ve specified the base root directory, i.e., “/”.
That is NOT a sub-directory of you home.

If you are in the base of your home sub-directory, here’s one way:

$ touch   ./hello/hello1
2 Likes

Thank you ^^

1 Like