• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

Renaming forlders

This seems like a very simple thing... I'm pretty new to linux, so I just don't know how to do it.

I want to rename folders.
The name of the folder might already exist, in which case it needs to replace the contents of that folder... but if that's a problem i can delete the folder prior to renaming the new one.

basically...

Backup6 --> Backup7
Backup5 --> Backup6
.
.
.
Backup1 --> Backup2
My Dir --> Backup1  (this one is a copy, not a rename)

Thanks
0
s_mack
Asked:
s_mack
1 Solution
 
arn0ldCommented:
man mv
info mv

rm -rf Backup7 2>/dev/null
mv Backup6 Backup7
etc.
0
 
s_mackAuthor Commented:
Thanks!  I knew it was something basic. I didn't think that mv would be the command, so thanks for pointing that out.

But why does this work???

When 6 --> 7, if 7 exists why doesn't it ADD the files to the folder??  I mean.. it works, and I'm happy. But what if I didn't want to COMPLETELY replace 7 with 6 but rather add 6's files to 7???

Just curious.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now