LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 10-26-2004, 08:27 PM   #1
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
dumb newbie question about renaming directories


i know that if i mv /path/file/name /path/new/file/name i can change the name of a file, but how do i do that with just part of a direcotry?

example:

/home/user/exsisting_dir/sub_dir

i want to change it to something like:

/home/user/new_name/sub_dir

and not touch any of the files, or sub directory structor. i want the subs and files to stay with the new name on the direcotry.

how do i do that?
 
Old 10-26-2004, 08:36 PM   #2
slackwaregeek
LQ Newbie
 
Registered: Oct 2004
Distribution: Slackware 10.2
Posts: 20

Rep: Reputation: 0
Re: dumb newbie question about renaming directories

Code:
cd /home/user
mv existing_dir new_name
that should suffice
 
Old 10-26-2004, 08:37 PM   #3
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
ok so i dont need a -r or anything like that as long as i navigate to the dir just above the one i want to rename..

kewl.

i had to use the GUI last time, but knew there had to be a way to do it with the CLI.

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
command line newbie help! -renaming files. mifan Programming 5 09-01-2005 06:06 AM
really dumb, but not 4 a newbie GingerMegs Linux - Software 11 05-04-2005 05:42 AM
Dumb ass newbie mistake...help! craigb Linux - Newbie 4 11-14-2004 12:07 PM
newbie that did something real dumb rnmartinez Linux - Software 5 06-08-2004 08:40 AM
Dumb Newbie Question: Apache Webserver stoney79 Linux - Newbie 4 12-23-2003 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:36 PM.

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