editing files/ deleting them help??

If none of the more specific forums is the right place to ask

editing files/ deleting them help??

Postby JohnJ » 2007-11-13 15:09

alright this has been driving me nuts, I try to edit a file by going to it and then opening it in a text editor on my debian server right. but when I go to save it, it says I dont have permission. I also try to delete folders and I cant because I need permissiong. How do I delete folders and files, and also how do I edit them? is there a way of doing this in the root terminal? someone help me please!
JohnJ
 
Posts: 53
Joined: 2007-10-15 18:57

Postby actionM » 2007-11-13 15:18

did you log in as root first?

su
youpassword

:shock:

I just had to ask...
--------------------
Debian Lenny - Xfce4
User avatar
actionM
 
Posts: 897
Joined: 2007-05-01 02:11

Postby Lou » 2007-11-13 15:22

I don't know if this is the answer, just how i do it:

If the file in question is mine (created by me or residing my /home), i launch my file manager (xfe) as user, right-click on it press Delete is gone.

If it is anywhere else in the system, then as ROOT or with sudo, i launch xfe and delete it, simple. I hope i understood your question correctly. All this takes but seconds, i have xfe and the rest of my favorite apps keybinded.

If this does not work, then you have a 'permissions problem' which i cannot help you with, and somebody else will explain it to you, because to be honest, i've never had had this problem.

Google has always saved me.

good luck!
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid
Lou
 
Posts: 1775
Joined: 2006-05-08 02:15

Postby JohnJ » 2007-11-13 16:47

ok I turn the machine on and login as me right, and then I go to the terminal and do the login as root. But once I do that I still can't go and edit those files by opening them manually. I dont know how to open them in the terminal with the debian default text editor. I can edit files and delete them in the terminal if I'm logged in as root but I just dont know the commands to delete files or edit them in the terminal. I wasn't able to move files manually because they were permissioned, but I figured out how to move files as root in the terminal.

So yea basically I just need to know the commands on how to edit the files with a text editor and I need the commands to delete files in the terminal. anyone know?
JohnJ
 
Posts: 53
Joined: 2007-10-15 18:57

Postby rickh » 2007-11-13 17:01

Google "basic bash commands"
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97
User avatar
rickh
 
Posts: 3473
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

Postby actionM » 2007-11-13 17:01

You just want some basic commands? Here is the first on the list at google.

http://www.ss64.com/bash/

be careful with that rm -r command :)

You can use nano to edit files.
nano /path/to/your/file.txt
after your done hold down ctrl + x to save.
--------------------
Debian Lenny - Xfce4
User avatar
actionM
 
Posts: 897
Joined: 2007-05-01 02:11

Postby Lou » 2007-11-13 18:00

actionM wrote:after your done hold down ctrl + x to save.


Isn't it:

Ctrl + O <Enter>
Ctrl + X

????
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid
Lou
 
Posts: 1775
Joined: 2006-05-08 02:15

Postby actionM » 2007-11-13 18:13

Your right. Ctrl + x is to exit, but it asks if you wana save it as well.

I should have said "to exit and save if changes were made"
--------------------
Debian Lenny - Xfce4
User avatar
actionM
 
Posts: 897
Joined: 2007-05-01 02:11

Postby Lou » 2007-11-13 21:14

actionM wrote:Your right. Ctrl + x is to exit, but it asks if you wana save it as well.

I should have said "to exit and save if changes were made"


My apologies, i did not know that.

BTW, it's "You're right", do not reaffirm the opinion the world has of us. Typos are forgiven, but contractions have to be spelled correctly :)
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid
Lou
 
Posts: 1775
Joined: 2006-05-08 02:15

Postby 987687 » 2007-11-13 21:37

If you want to browse files as root, the same as you would with a regular user do this in a root terminal:
if you use gnome:
Code: Select all
nautilus

if you are using KDE:
Code: Select all
konqueror

that will open the file browser as root, and any file you open from there will be opened as root. But you have to be careful with this, make sure you know what windows are opened as root, and which are not.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
User avatar
987687
 
Posts: 2121
Joined: 2007-06-11 10:58
Location: Vacation Land

Postby actionM » 2007-11-13 21:42

"You're" bustin' my balls. :D
--------------------
Debian Lenny - Xfce4
User avatar
actionM
 
Posts: 897
Joined: 2007-05-01 02:11

Postby Lou » 2007-11-14 00:24

"You're" the reason the world thinks "we're" ignorant, uncouth, and classless. We "can't" even write in English and the limeys laugh at us.

What the hell, if the boy from Texas talks about "nukular" attacks what can we expect from the rest of the trailer-trash?
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid
Lou
 
Posts: 1775
Joined: 2006-05-08 02:15

Postby JohnJ » 2007-11-15 16:40

is there a way to login as root? like when I turn the machine on and it starts and goes to the login screen, is there a way to login as root?

or is there a way to login as root instead of using the terminal so I can just browse my files easily?

Well I wants to edit files from my web server such as apache2-default index.html page. It has permissions but is there a way I can be root and just go into those files and open them up, edit them and then save them without using the terminal?
JohnJ
 
Posts: 53
Joined: 2007-10-15 18:57

Postby actionM » 2007-11-15 16:55

987687 wrote:If you want to browse files as root, the same as you would with a regular user do this in a root terminal:
if you use gnome:
Code: Select all
nautilus

if you are using KDE:
Code: Select all
konqueror

that will open the file browser as root, and any file you open from there will be opened as root. But you have to be careful with this, make sure you know what windows are opened as root, and which are not.


JohnJ, did you try this method? Its pretty easy.
--------------------
Debian Lenny - Xfce4
User avatar
actionM
 
Posts: 897
Joined: 2007-05-01 02:11

Postby rickh » 2007-11-15 16:56

Real Debian users do not log into a GUI desktop interface as "root". The Debian developers have not made it impossible, but they have made it non-obvious for very good reasons.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97
User avatar
rickh
 
Posts: 3473
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable