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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-23-2005, 03:21 PM
|
#1
|
|
Member
Registered: Dec 2004
Location: Maryland
Distribution: SuSE / Gentoo
Posts: 245
Rep:
|
renaming files
Hey guys, I downloaded a bunch of stuff with d4x, and it saved them all beginning with a dot.
example:
.foo.txt
Last time I tried renaming them, (about 50 of them) I did something like # mv .* * and ended up deleting all my files. I was seriously mad at myself for a week. What is the way to take some .file.extension and move them to file.extension with a single command?
|
|
|
|
12-23-2005, 08:07 PM
|
#2
|
|
Guru
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697
Rep:
|
Cannot think of a command persay. A simple script can do this but I am terrible at scripting. If nothing happens in a couple of days you might post a similiar topic under the programming section. I use Krename from KDE to do things like you want. http://freshmeat.net/projects/krename/
Brian1
|
|
|
|
12-23-2005, 09:33 PM
|
#3
|
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 3,816
Rep: 
|
See "man rename" (no quotes). The rename commandwill do what you want, e.g.
Code:
rename . '' .[a-zA-Z0-9]*
You might want to make a backup copy of the files first, just in case!
|
|
|
|
12-24-2005, 04:11 AM
|
#4
|
|
Senior Member
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Rep:
|
I'd been trying to come up with something using rename, but I got stuck using ? as a wildcard. Nice sollution!
|
|
|
|
12-24-2005, 10:14 AM
|
#5
|
|
Member
Registered: Dec 2004
Location: Maryland
Distribution: SuSE / Gentoo
Posts: 245
Original Poster
Rep:
|
Oh good call! What I discovered in the meantime was a slick way to do it in windows with a little program.. good program, bad os. Thanx for the rename command - just what I needed!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:26 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|