LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-26-2004, 01:42 PM   #1
chrisk5527
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Slackware Linux 10.0
Posts: 289

Rep: Reputation: 30
Forward slashes in filenames. Convert from 2f to Colon


I'm pulling files from a CD on a Mac over to Linux through Netatalk. When I do, the / in the filename is converted to a 2f (2f is hex for / ) . Is there anything that Samba or Netatalk can do to convert the 2f to a hyphen on the fly? I saw an option called "mangled map" for Samba, but I couldn't figure it out. Is there some kind of program that will look at a filename, see the 2f and convert it to a hypen? Any solution would be good.
 
Old 03-26-2004, 02:19 PM   #2
chrisk5527
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Slackware Linux 10.0
Posts: 289

Original Poster
Rep: Reputation: 30
Search filenames for specific characters

How can I search a filename 2f and replace it with 2d? These hex values will replace a / with a - . Is there a program available to search filenames?
 
Old 03-26-2004, 02:22 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
//Moderator Note: I merged these threads to keep the discussion in one thread, since these are similiar enough. Regards.
 
Old 03-26-2004, 03:22 PM   #4
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
You mean replace occurrences of the character sequences 2f in a filename for files that exist on your hard drive? I don't know samba or netaralk way but

If so, if

filename=the name of a file with lots of 2f in it

You could incorprate

mv $filename ${filename//2f/-} # replace the - with whatever you want

into a simple script, anyway that's one way if I've understood right.
 
  


Reply



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
AIX colon files rayudu AIX 2 07-09-2005 05:51 PM
What do two forward slashes in a url mean? (not the inital 2) johnMG Linux - Networking 2 06-28-2005 10:27 AM
bash and double slashes MD3 Linux - Software 0 02-18-2005 03:13 PM
need a semi colon .. but vert spooge Linux - General 4 09-19-2004 03:52 PM
convert filenames case griv Linux - General 6 01-17-2002 11:10 PM

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

All times are GMT -5. The time now is 06:03 AM.

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