AWS 95 - A/UX: Remove File with 8-Bit, Option Characters (5/95)


I have special Macintosh characters in my file names on my Apple Workgroup Server (AWS) 95 Disk, such as "Àrich".

When I try to remove them from the command shell by the command:

rm Àrich

OR

rm "Àrich"

I am prompted, "Use 'exit' to leave csh". How can I remove these files from the command shell or startup shell?

You can create, copy, or rename file names with a special character -- such as the trademark character -- under the A/UX 3.x Finder. Under CommandShell running the default shell, csh, you cannot EXPLICITLY specify the file name with a special character on the command line since this special character cannot be recognized by the CommandShell. Hence, you get the "Use exit to leave csh" message.

Additionally, the option 8, "*" is usually translated into a period in the CommandShell environment, but with the environment variable TBSEEDOTS=1 set in A/UX 3.1.1, this character is translated to "," in the CommandShell environment. If the usual delete commands "rm" or "rmdir" are used to remove one of these files, the CommandShell may report that the file with these characters is nonexistent, even though you can see it both from the Finder and by using the "ls" command in the command shell.

Here is how to remove eight bit characters like ã, ┤, *,╩¤, and ┐ in a file's name under AWS 95 A/UX CommandShell or A/UX Startup Shell.


Under A/UX CommandShell
=======================

Option 1
--------
No matter which CommandShell you are using, you can do:

ls -li # To list all files in a directory, and find the inode number
. # that the 8-bit character file name you are going to delete.

find . -inum inode-number(s) -exec rm {} \\; # This will remove all files
. # with the correspondent
. # inode.

NOTE: The inode-numbers(s) are the inode numbers you found with 'ls -li', for example remove files with inode numbers 100, 120, 140, and 155. Below is an example of the command to remove files with inode numbers 100, 120, 140, and 155.

find . -inum 100 120 140 155 -exec rm {} \\;

Option 2
--------
Under Korn Shell (ksh), you can explicitly remove that file, for example, try to remove the ¢abcã file.

% ls -FC
--> ¢abcã
$ ksh
$ rm *abc*

or

$ rm ¢abcã

If the file name contains space(s), you may use single quotes to enclose the name. Below is an example:

$ rm '¢ a b cã'


Under A/UX Startup Shell
========================

Sometime it may necessary to go into the Startup Shell to remove or move files, if the system crashes as a result of a eight bit character file name in the System Folder, and these files need to be removed or moved to some other directory. To get into the Startup Shell, press Command-"." (period) to stop the A/UX start up process while A/UX Startup is launching; you will then get to the "startup#" prompt. Since the 'find' command is not available in A/UX Startup Shell, use the 'rm -ir' command, and answer no to all the files in the directory except the offending file.

startup# cd to-a-directory
startup# rm -ir .

NOTE: There is a space and period following the r.

WARNING: This command does a recursive delete of the current directory asking for permission for every file. DO NOT FORGET THE "-i" OPTION because the -r option alone recursively deletes the entire contents of the specified directory, and the directory itself.


Article Change History:
11 May 1995 - Updated article and changed title.

Support Information Services
Published Date: Feb 19, 2012