PDA

View Full Version : moving files in Linux



yawningdog
11-29-2001, 08:05 PM
I downloaded Java for my Linux system to my desktop in Mandrake 8.1. Everything works fine but I want to put it in /usr/local/ but I get an error message when I try to paste it there. Is there a way to move it or am I stuck with it on my desktop?

------------------
Give a man a fish, and you feed him for a day. Teach him to use the net, and he wont bother you for weeks.

Rick
11-29-2001, 08:46 PM
You should be able to use the CP (copy program) command.
if you have permission for the destination folder

------------------
To ERR is HUMAN
To REALLY screw things UP, YOU NEED a COMPUTER !

yawningdog
12-02-2001, 06:43 PM
I'm going to need some help with this permissions thing. I've been checking and unchecking boxes for about an hour (right click-properties-permissions) and nothing seems to work, even as root.

------------------
Give a man a fish, and you feed him for a day. Teach him to use the net, and he wont bother you for weeks.

Ghost_Hacker
12-09-2001, 10:40 AM
The best way to work with permissions is from the command prompt. ( however the "GUI" mode works just as well, but I'll go over permssions just in case) Navigate to root and type "ls -l" this will display the permissions for all files and directories at the root level. The permissions for a directory might look like this:

drwxr-xr-x directory_name

d = directory
r= read
w = write
x= execute

After the "d" ( a file would display a "-" in place of the "d")the permissions are displayed in groups of 3.

drwxr-xr-x

The first group of 3 is for the owner, the second are "group" rights and the last group of 3 is for everyone. So in the example above the owner has all permissions, the group permissions are read ,execute and "everyone" else has read and execute permissions to this directory.

Each permission has a value and permissions can be assigned or changed using the chmod command. For example the "read" permission is valued at 4, the "write" permission is valued at 2 and the "execute" permission is valued at 1. Now lets say I wanted to give all rights or permissions to "everyone" I would use this command.

chmod 757 dicrectory_name

Each permission's value is added togethere to arrive at the final value of permissions assigned. So the first "7" means that the owner has all permissions (read (4) + write(2) + execute(1) = 7). The group permissions are read and execute (read(4) + execute(1) = 5) and the "everyone" permissions have been changed to all permissions (read (4) + write(2) + execute(1) = 7).


Hope this helps, if your still having this problem.




[This message has been edited by Ghost_Hacker (edited 12-09-2001).]