low-order seven bits


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users low-order seven bits
# 1  
Old 09-27-2004
Question low-order seven bits

Hi and thx in advance Smilie

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 Smilie , 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).
# 2  
Old 09-29-2004
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

# 3  
Old 10-06-2004
the -b option of ls gives the octal value for non printable characters, using the tr command as indicated it's much more simple.
Thx.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. What is on Your Mind?

Place Bits & Win Bits!!! - 17th Annual Satellite Awards

Ten movies have been nominated as best motion picture by the International Press Academy, presentation of the 2012 Satellite Awards will be held on 16th December at Los Angeles, CA. Place your bits here on one of the below nominated movie of your choice:- Argo ... (0 Replies)
Discussion started by: Yoda
0 Replies

2. AIX

High Runqueue (R) LOW CPU LOW I/O Low Network Low memory usage

Hello All I have a system running AIX 61 shared uncapped partition (with 11 physical processors, 24 Virtual 72GB of Memory) . The output from NMON, vmstat show a high run queue (60+) for continous periods of time intervals, but NO paging, relatively low I/o (6000) , CPU % is 40, Low network.... (9 Replies)
Discussion started by: IL-Malti
9 Replies

3. UNIX for Dummies Questions & Answers

32 bits procesaor with 64 bits Solaris

people i have a problem i have a 32 bits sparc processor, and solaris 64 bits processor, i install a oracle data base 64 bits, but my oracle will not run because my processor is from 32 bits this is ok??, i know if i have x86 i cannot install a 64 bits operatin system in a 32 bits processor. ... (0 Replies)
Discussion started by: enkei17
0 Replies

4. AIX

How to convert a partition usin 64 bits kernel to 32 bits kernel?

Hello there: I know that exist a procedure to convert an OS using 32bits kernel to 64 bits kernel. But, exist a procedure to convert an OS using 64bits to 32 bits kernel? Please help me. Regards. (2 Replies)
Discussion started by: GEIER
2 Replies

5. AIX

Pend Low Mbuffs

Help.. my RS600 7043-140 keeps on hanging everyday. This is the output of "errpt -a": LABEL: PEND_LOW_MBUFS IDENTIFIER: E9B4EB4B Date/Time: Tue Jul 29 12:16:02 Sequence Number: 1183 Machine Id: 006066844C00 Node Id: mgmtoracle Class: ... (1 Reply)
Discussion started by: bright_genius
1 Replies

6. UNIX for Dummies Questions & Answers

low RAM

Hy, I've an 486 dx2 laptop an I want to run unix on it, the problem is it has only 4 megabytes of ram, so my question is; does anybody know an unix based OS which runs with only 4 mb? thanx (7 Replies)
Discussion started by: counTnegaTive
7 Replies

7. UNIX for Dummies Questions & Answers

Changing 24 bits to 8 bits display

Hello all, I was wondering if anyone can tell me how to change 24 bits depth display to 8 bits depth display for Sun Ultra1, running Solaris 8? THANKS in advance. I think that the command is ffbconfig, but it has nothing about depth. (4 Replies)
Discussion started by: larry
4 Replies
Login or Register to Ask a Question