LinuxQuestions.org
Review your favorite Linux distribution.
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 07-14-2003, 03:30 PM   #1
warkrime
Member
 
Registered: Jul 2003
Location: Sammamish, WA, USA
Distribution: Gentoo
Posts: 42

Rep: Reputation: 15
mv the contents of one directory to the parent directory


I'm determined to learn how to use the shell. I can't figure out how to move the contents of a directory to the parent directory though. This is what happens when I try what I think will do the trick:

Code:
[root@localhost misc]# ls vgafonts|mv /usr/X11R6/lib/X11/fonts/misc/vgafonts /usr/X11R6/lib/X11/fonts/misc
mv: `/usr/X11R6/lib/X11/fonts/misc/vgafonts' and `/usr/X11R6/lib/X11/fonts/misc/vgafonts' are the same file
[root@localhost misc]#
 
Old 07-14-2003, 03:46 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Well, your trying to move vgafonts that is in /usr/X11R6/lib/X11/fonts/misc/ to /usr/X11R6/lib/X11/fonts/misc/ in which it already resides in.

What directory are you trying to move them to specifically? Your command your trying to move them to the same directory they already reside in.
 
Old 07-14-2003, 04:33 PM   #3
warkrime
Member
 
Registered: Jul 2003
Location: Sammamish, WA, USA
Distribution: Gentoo
Posts: 42

Original Poster
Rep: Reputation: 15
I'm trying to move the files inside the directory /usr/X11R6/lib/X11/fonts/misc/vgafonts to /usr/X11R6/lib/X11/fonts/misc.
 
Old 07-14-2003, 04:36 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Oh so any files in vgafonts that are in the misc directory, you want moved out of vgafonts and into misc? Use the wildcard to select all files with a * like this:

Code:
mv /usr/X11R6/lib/X11/fonts/misc/vgafonts/* /usr/X11R6/lib/X11/fonts/misc/
Without the /* at the end of /usr/X11R6/lib/X11/fonts/misc/vgafonts your trying to actually move the whole directory of vgafonts to misc, where it already resides. Hope it makes sense to you now to accomplish the move?

Last edited by trickykid; 07-14-2003 at 04:37 PM.
 
Old 07-14-2003, 07:03 PM   #5
warkrime
Member
 
Registered: Jul 2003
Location: Sammamish, WA, USA
Distribution: Gentoo
Posts: 42

Original Poster
Rep: Reputation: 15
OK I was overthinking the problem by trying to use ls. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to check if a parent directory is a symbolic link compnovice Linux - Newbie 11 10-06-2005 05:59 PM
.htaccess restricting parent directory Braytac Linux - Networking 2 05-26-2005 05:27 PM
'cp -rv .*' recurses into the parent directory??? stefanlasiewski SUSE / openSUSE 5 02-02-2005 05:36 PM
java - parent directory problem ludeKing Programming 8 10-07-2004 07:25 PM
List only the parent directory scottrell Linux - General 6 11-07-2003 09:10 AM

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

All times are GMT -5. The time now is 06:32 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