Operating System - HP-UX
1838250 Members
4321 Online
110125 Solutions
New Discussion

What does the character code "^N"?

 
SOLVED
Go to solution
Katsu39
Frequent Advisor

What does the character code "^N"?

Hello All,
I had found the special character "^N" within a file name. When I had done the command "ls -l" in the same directory,the result of the command had been turned to strange character.
When I did the command "ll |more" the file name had been shown like a below.
-rw-rw-rw- root sys 03 MAR 08:40 ^NP^NDep

What does the character "^N" 's mean?

Regards;
Katsu
4 REPLIES 4
Chris Wilshaw
Honored Contributor

Re: What does the character code "^N"?

It's simply a control character that someone has managed to enter while trying to create the file. It's quite a common thing.

To remove this file, use

rm -i *Dep

This will prompt you to remove each file in the directory that ends in Dep so that you only remove the one that you want to.
Mark Greene_1
Honored Contributor
Solution

Re: What does the character code "^N"?

The "^N" is the key sequence control-N. You can do an stty -a to see what that may be mapped to. You can rename the file using the cp command and the control-V sequence to enter the control-N character like this:

cp control-V control-N P control-V D e p

(without the spaces between)

You can then remove the old file with rm using the same method.

HTH

mark
the future will be a lot like now, only later
A. Clay Stephenson
Acclaimed Contributor

Re: What does the character code "^N"?

I suspect it simply means that someone (or a process) entered a caret ("^") followed by an "N" for a pathname. Depending on your display device it could also indicate that someone embedded a Control-N (ASCII 14) in a pathname. It means nothing.

You can get rid of this file by
rm -i *Dep* and answering 'y'.
If it ain't broke, I can fix that.
Katsu39
Frequent Advisor

Re: What does the character code "^N"?

Dear all;
Thank you for your quic replaying.
The problem had been fixed by your advice.
Thank you.

Regards;
Katsu