Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Filenames preceded by dash

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Flandry
n00b
n00b
Posts: 52
Joined: Fri Feb 27, 2004 4:55 am
Location: Boston, MA

Filenames preceded by dash

  • Quote

Post by Flandry » Tue Jul 05, 2005 4:55 pm

I copied a bunch of directories from a FAT filesystem to a Reiser filesystem, and one of the filenames was preceded by two dashes. Now i can't do any wildcard operations on that directory, and any attempt to delete or rename the offending file gives me the error

Code: Select all

unrecognized option: '--filename' 
. It doesn't matter if i use quotes or escape the dash or anything. How can i operate on that file to change the name or get rid of it?
Top
RoadRunn
Apprentice
Apprentice
Posts: 162
Joined: Thu Jun 10, 2004 5:43 pm
Contact:
Contact RoadRunn
Website

Re: Filenames preceded by dash

  • Quote

Post by RoadRunn » Tue Jul 05, 2005 5:06 pm

Flandry wrote:I copied a bunch of directories from a FAT filesystem to a Reiser filesystem, and one of the filenames was preceded by two dashes. Now i can't do any wildcard operations on that directory, and any attempt to delete or rename the offending file gives me the error

Code: Select all

unrecognized option: '--filename' 
. It doesn't matter if i use quotes or escape the dash or anything. How can i operate on that file to change the name or get rid of it?
Try:

Code: Select all

mv -- --filename filename
The "--" parameter is to deal with filenames that have a - in them
Top
Flandry
n00b
n00b
Posts: 52
Joined: Fri Feb 27, 2004 4:55 am
Location: Boston, MA

  • Quote

Post by Flandry » Tue Jul 05, 2005 6:39 pm

Perfect, just what i was looking for: Thanks!
Top
canal
Apprentice
Apprentice
Posts: 203
Joined: Tue Sep 28, 2004 7:07 am

  • Quote

Post by canal » Tue Jul 05, 2005 7:41 pm

Flandry wrote:Perfect, just what i was looking for: Thanks!
Yet some programs do not support this feature - then tried and true way (use ./*.txt instead of *.txt :-)) works too.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic