renaming files

Peter Larsen plarsen at famlarsen.homelinux.com
Fri Nov 5 16:34:36 UTC 2010


On Fri, 2010-11-05 at 14:11 +0000, arnaldo gomes wrote:
> Hello
> 
> Just installed fedora 14 but when I try renaming a file it includes
> the extension, unlike Fedora 11.
> Is this normal ?

There's really no such thing as "extension" with Linux. You can easily
have a file called my.very.long.file.name - the "." is just part of the
file name. The last part of a filename after the last . doesn't have
special meaning either. It's purely aesthetics for the user to know what
type of content a file has.

When you rename using mv it uses the default globbing rules. That means
that *.abc matches any file that ends on .abc - even if it's named
test.1.abc or file.abc. You have the option of doing very advanced
matches if you want to make a difference on that "level" the . is on.

Also, besides the traditional "mv" command for renaming, you have more
advanced methods for mass renaming, like "rename". They too depend on
simple pattern matching - so if you choose to match on the last part of
a file name, they do that nicely too. 

None of this has changed with Fedora for a long time.

With Nautilus when you select a file and choose rename, it SHOULD only
highlight the first part of the filename for you (until the first .).
This behavior irritates me given the nature of a Linux file system not
to care about extensions, but that's the way it's been for a while. It's
easy however to accidentally expand the selection to be the hole file
name, and in that case you'll change the full name. I see no change in
behavior there between F12 -> F14. It still only highlights until the
last dot (.).


-- 
Best Regards
  Peter Larsen

Wise words of the day:
Win95 is not a virus; a virus does something.
	-- unknown source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20101105/e96ae2a4/attachment.bin 


More information about the users mailing list