![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to convert a partition usin 64 bits kernel to 32 bits kernel? | GEIER | AIX | 2 | 08-18-2008 03:20 AM |
| perm bits | mpang_ | Shell Programming and Scripting | 1 | 02-10-2007 10:17 AM |
| AIX Bits and Pieces | bakunin | AIX | 0 | 12-07-2005 10:20 AM |
| 64 bits file | qfwfq | HP-UX | 1 | 02-14-2005 04:35 PM |
| Changing 24 bits to 8 bits display | larry | UNIX for Dummies Questions & Answers | 4 | 03-05-2002 11:51 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi and thx in advance
I have to transfert files between a UNIX server and a Network Appliance Filer and i have problem with accent characters on filename. On unix side accent are interpreted as follow ls -l unix* | cat -v -rwxr--r-- 1 a067842 admDE 0 Sep 24 16:33 unix_M-^J.txt and are well interpreted using samba (i.e. a windows workstation show the correct character). If i transfert the file (using rsync with archive mode) on the filer and access it using NFS I see the same filename ls -l unix* | cat -v -rwxr--r-- 1 root other 0 Sep 24 16:38 unix_M-^J.txt but It's not well interpreted by DOT (Data OnTap which is the Netapp filer Operating System) when accessed from a windows workstation (i.e. a windows workstation doesn't show the correct character) If I create the file with the wanted filename from windows workstation on the filer it appears accessed from NFS like: ls unix*.txt | cat -v unix_M-i.txt So I understand that M-i and M-^J shown by the cat -v command are differents , I will have to scan all my data and replace one character by the oher one to make the migration a success. Problem how can I do this??? The cat man page indicates that characters starting with a "M-" string are non printable and correspond to the "low-order seven bits", is there a way to manipulate this ASCII characters using sed or something else? Sorry for the long post, hope it's roughly clear (Huummhhh, not sure). |
|
||||
|
You can employ tr to change control characters to something printable. Filenames with embedded control characters cause trouble.
try something like this to get rid of control characters. Code:
for file in /path/*
do
tmpfile=`basename "$file"`
tmpfile=`echo "$tmpfile" | tr -s '[:cntrl:]' 'z' `
mv "$file" /path/"$tmpfile"
done
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|