Results 1 to 6 of 6
I need to create a file in ect/udev/rules.d/ but can not create a file. I checked the folder permissions and it says that root was the owner and that I ...
- 11-08-2009 #1Just Joined!
- Join Date
- Nov 2009
- Posts
- 3
How to create a file in root --terminal--
I need to create a file in ect/udev/rules.d/ but can not create a file. I checked the folder permissions and it says that root was the owner and that I could not do anything. If you all can help, how do you create a file in / with terminal being root of course.
I've already tried using gedit, but that didn't help because the file didn't exist yet.
"touch: cannot touch `/etc/udev/rules.d/95-uinput.rules': Permission denied"
is what I get why trying to use touch.
- 11-08-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
I presume you meant /etc/udev/rules.d. You need to be root, or have sudo privileges to add files to this directory. You can use vi/vim or just about any other text editor to create/write files to this directory. If you are having trouble with gedit because the file you need to create doesn't exist yet then you can create an empty file with the touch command: touch name-of-file
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-08-2009 #3Just Joined!
- Join Date
- Nov 2009
- Posts
- 3
I figured out I left "sudo" out.
I'm having a bit of trouble using VI Text Editor.
It won't let me type Kernel without removing the Ke automatically.Code:sudo vi /etc/udev/rules.d/95-uinput.rules
- 11-08-2009 #4Just Joined!
- Join Date
- Nov 2009
- Posts
- 3
Any help with the typing of Kernel into VI?
- 11-08-2009 #5Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
Type "i" first.. puts you in Insert mode, which is more like a traditional editor.
vi is a real PITA to a new user, it should never be suggested (cruel joke really. It may be one of the most efficient editors once you know how to use it, but the learning curve is ugly steep). I'd suggest you use nano or even gedit instead.
- 11-08-2009 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
VI is a modal editor. Before you insert text, you need to press 'i' (no quotes) for 'insert' mode, 'a' for 'append' mode, etc. Then you can type in "Kernel...". To get back to command mode, enter <escape>: (escape key + colon). Then you can type w<enter> to write the file, then q to quit.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
