Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a stupid question. I am normally a SuSe user, but I decided to give UBUNTU a try, and see what it is like. But this is my issue, I was setting up java, and not knowing SuSe and UBUNTU setup java in a different way, I did what I normal do and
download the .bin final from sun
su to root
chmod so it executable
./java_name_file.bin
well that kind of worked, it pretty much unpacked whatever files where in the .bin file and put placed all the files in the directory I executed the bin file. After googling it for a bit, and finding out that SuSe and UBUNTU setup java differently, I tired to removing the directory that the .bin file created, and couldn't cause it was owned by root. So after su to root and removing, the directory, and setting up java the correct way. Now I have jdk1.6.07 directory, with all of it files in the trash bin and it wont empty. If you empty trash, it acts like it emptys but it still in there, tried opening up trash itself, and deleting the directory, all it does is give me an error saying I don't have promission, I know why cause I screwed up and ./ the java bin file as root. So does anyone know how I can empty the trash as root? I know I am sure this is a every stupid question, and it is probably staring me right in the face. But I can't figure it out.
In your explanation you said you used 'su' to root. Did you set Ubuntu up so that will work? I'm asking because that is not the way Ubuntu is set up. The Ubuntu people believe using 'sudo command' is the correct way to do things.
I have used Ubuntu, Kubuntu and Xubuntu, the first thing I did was set up the system to allow a simple 'su' followed by me entering the root password. If you want to do that, have a look on the Ubuntu users web site, the instructions to set up 'su' to root are there. ( been too long, don't remember the command ).
In theory, you should be able to delete a root owned file by doing 'sudo rm filetobedeleted'. It should prompt for the password. Then it should be gone. There are a few ways of protecting a file beyond this, but I wouldn't expect they would apply to java files.
The other way to delete the files would be to use 'sudo chown user:user filename' and then as the user use rm filename. Either way you need to get root privileges.
If you have a lot of files to delete, you could also try to use the file manager program as root. To do that, open a bash command prompt, and run the file manager as as root, 'sudo filemanagerprogramname' give the root password. Be careful, you are dangerous as the root user. I don't remember the name of the file manager program for Gnome, so you will need to figure that one out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.