LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2007, 08:29 PM   #1
Labrat21
LQ Newbie
 
Registered: Nov 2007
Location: Madison
Posts: 6

Rep: Reputation: 0
trouble moving files


I am totally new to linux. I am practicing simple commands. Currently i am only able to mv files to subdirectories. for example if I have two directories, directory 1 (which contains file JOKES and subdirectory 1) and directory 2 (which contains no files). I am able to mv the JOKES file to subdirectory 1, but I am unable to mv the JOKES file to directory 2.

Basically I can mv files down, but not up. I hope this is clear

thanks in advance for any help.
 
Old 11-12-2007, 08:39 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
It isn't clear. You might want to post what commands you are trying. Also, your directory names seem to contain spaces, so you need to escape the spaces with backslashes or use quotes.
 
Old 11-12-2007, 08:46 PM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Every directory and file has an owner - a user account on the system which has ultimate control of the file or directory.

If you are in the terminal, you can see this when you do the "ls -l" command. For example, an except of the output of the ls -l command in my home directory:
Code:
$ ls -l
total 13
drwxr-xr-x 13 matthew matthew 4096 2007-11-12 17:57 Desktop/
drwxr-xr-x 28 matthew matthew 4096 2007-10-20 04:05 documents/
The owner is the third column (in this case my user name "matthew").

In combination with the permissions on the directory (represented in the first column), this control who may create or rename files in that directory.

Each user has their own directory in /home.... in my case /home/matthew. This is where I am expected to store all my files. All other parts of the directory tree will be owned bu other user accounts on the system (if there are others... each will have their own directory in /home), or special system users - mostly "root".

Most of the programs and data files used by program on the system will be owned by the root user (the system administration user), and may not be touched by your normal user. This is a good protection for your system. Imagine if you visit a web page which exploits some security flaw in the browser... the browser runs as your user, so it cannot alter program files and so on. This can be helpful to keep your system safe.

If you don't care so much about the why, just know that you should keep all your files in your home directory. If you want to know how and why it works, have a read about Linux file permissions.
 
Old 11-12-2007, 08:49 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Here's another nice article on the topic: http://www.linuxforums.org/security/...rmissions.html
 
Old 11-12-2007, 08:56 PM   #5
Labrat21
LQ Newbie
 
Registered: Nov 2007
Location: Madison
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you

Thanks so much for your help. With your help I was able to correct my problems. I wasn't working from /home

Thanks again
 
Old 11-13-2007, 01:39 AM   #6
LlNUX
Member
 
Registered: Oct 2007
Location: Sydney, Australia
Distribution: Debian
Posts: 63

Rep: Reputation: 15
check mv command for some examples:

linux commands

hope this helps
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble moving Ubuntu system to an other drive terreaultguy LinuxQuestions.org Member Intro 3 08-14-2007 01:01 AM
moving files Baghdad Linux - Newbie 5 01-22-2006 01:39 AM
MNF - Trouble Moving IPs behind the DMZ comkid Linux - Networking 1 11-15-2004 10:55 AM
Moving linux->New HDD: LILO trouble! tredegar Linux - Newbie 11 12-31-2003 11:50 AM
Trouble moving characters with C in a simple CLI program WindowsBurner Programming 4 12-11-2003 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration