![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to convert a partition usin 64 bits kernel to 32 bits kernel? | GEIER | AIX | 2 | 2 Weeks Ago 12:20 AM |
| perm bits | mpang_ | Shell Programming and Scripting | 1 | 02-10-2007 06:17 AM |
| AIX Bits and Pieces | bakunin | AIX | 0 | 12-07-2005 06:20 AM |
| 64 bits file | qfwfq | HP-UX | 1 | 02-14-2005 12:35 PM |
| Changing 24 bits to 8 bits display | larry | UNIX for Dummies Questions & Answers | 4 | 03-05-2002 07:51 AM |
|
|
LinkBack | Thread Tools | 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 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). |
| Forum Sponsor | ||
|
|
|
|||
|
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
|