04-12-2006
How to delete a file with special characters
I don't now exactly how I did it, but I created a file named " -C "
cexdi:/home1 $ls -lt
total 1801336
-rw------- 1 cexdi ced-group 922275840 23 mars 10:03 -C
How do I delete this file ?
cexdi:/home1 $rm -C
rm: invalid option -- C
Syntax : rm [-Rfir] filename ...
Doesn't work... I'm stuck.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a file which has special characters. I can't see them when I "vi" the file. But I am sure there are some special un seen characters. How can I see them?
Please help.
Thx (6 Replies)
Discussion started by: jingi1234
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a data like this in a file,
402003279034002000100147626030003300010000000000002000029000000 ær^M^\MÍW^H
I need to replace those special char to some other char like # or $
Is there any ways to do it...
I tried commands tr,sed and many but it was not able to replace because... (1 Reply)
Discussion started by: solai
1 Replies
3. Shell Programming and Scripting
Hi all,
I have the following lines
<b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>B gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>J gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
and I would like to... (5 Replies)
Discussion started by: stinkefisch
5 Replies
4. Shell Programming and Scripting
Hello Team,
Any one suggest how to delte the below special character from a file which is having one column 10 rows of same below content.
----------------------------------------
Kosten|bersicht gemd_ ' =Welche Kosten kvnnen... (2 Replies)
Discussion started by: kanakaraju
2 Replies
5. Shell Programming and Scripting
Hello All,
I am facing challenges in order to transfer a file from windows to unix box,the file contains a special character '×' ,now when I am transferring the file from windows to unix that special character converted to something else like 'Ã' ,another thing I have noticed that the hardware is... (1 Reply)
Discussion started by: prarat
1 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I have a problem with file naming in linux. I have to create a file named like 11/22.csv but shell displays error: no such file or dir. Problem is / character in the file name. I searched unix linux naming concepts and it's restricted in OS. Please tell me if there's any other chance?
OS... (3 Replies)
Discussion started by: sembii
3 Replies
7. Shell Programming and Scripting
I want to parse a file containing special characters, below is a sample content of file
content of file :
Serial_no:1$$@#first_name:Rahane$$@last_name:Ajiyenke@@#profession:cricketer!@#*&^
Serial_no:1$$@#first_name:Rahane$$@last_name:Ajiyenke@@#profession:cricketer!@#*&^... (3 Replies)
Discussion started by: rajMjar
3 Replies
8. Shell Programming and Scripting
My sed is not working on deleting the entire special characters and leaving what is necessary.grep connections_per a|sed -e 's/\<\!\-\-//g'
INPUT:
<!-- <connections_per_instance>1</connections_per_instance> -->
<method>HALF</method>
<!--... (10 Replies)
Discussion started by: kenshinhimura
10 Replies
9. UNIX for Beginners Questions & Answers
I am trying to rename files with spaces and other characters and not able to be successful.
FileNames:
UPLOAD REFERENCE.xls
UPLOAD MASS REFERENCE.XLS
find /UPLOAD REFERENCE/ -depth -type f -name "* *" -exec rename " " "_" "{}" ";"
The above one is successful to replace spaces... (1 Reply)
Discussion started by: eskay
1 Replies
10. UNIX for Advanced & Expert Users
Hi,
I have a file in unix with 15 columns.It consists special characters(#,$,^M,@,*,% etc)at the end of the each record.I want to remove these special characters.I used the following:
Sed -e 's/ /g;s/ */ /g'
. But It is removing special characters exists everywhere in the file(begining,middle... (24 Replies)
Discussion started by: rakeshp
24 Replies
LEARN ABOUT SUNOS
ramdiskadm
ramdiskadm(1M) System Administration Commands ramdiskadm(1M)
NAME
ramdiskadm - administer ramdisk pseudo device
SYNOPSIS
/usr/sbin/ramdiskadm -a name size [g | m | k | b]
/usr/sbin/ramdiskadm -d name
/usr/sbin/ramdiskadm
DESCRIPTION
The ramdiskadm command administers ramdisk(7D), the ramdisk driver. Use ramdiskadm to create a new named ramdisk device, delete an existing
named ramdisk, or list information about existing ramdisks.
Ramdisks created using ramdiskadm are not persistent across reboots.
OPTIONS
The following options are supported:
-a name size
Create a ramdisk named name of size size and its corresponding block and character device nodes.
name must be composed only of the characters a-z, A-Z, 0-9, _ (underbar), and - (hyphen), but it must not begin with a hyphen. It must
be no more than 32 characters long. Ramdisk names must be unique.
The size can be a decimal number, or, when prefixed with 0x, a hexadecimal number, and can specify the size in bytes (no suffix),
512-byte blocks (suffix b), kilobytes (suffix k), megabytes (suffix m) or gigabytes (suffix g). The size of the ramdisk actually cre-
ated might be larger than that specified, depending on the hardware implementation.
If the named ramdisk is successfully created, its block device path is printed on standard out.
-d name
Delete an existing ramdisk of the name name. This command succeeds only when the named ramdisk is not open. The associated memory is
freed and the device nodes are removed.
You can delete only ramdisks created using ramdiskadm. It is not possible to delete a ramdisk that was created during the boot process.
Without options, ramdiskadm lists any existing ramdisks, their sizes (in decimal), and whether they can be removed by ramdiskadm (see the
description of the -d option, above).
EXAMPLES
Example 1: Creating a 2MB Ramdisk Named mydisk
# ramdiskadm -a mydisk 2m
/dev/ramdisk/mydisk
Example 2: Listing All Ramdisks
# ramdiskadm
Block Device Size Removable
/dev/ramdisk/miniroot 134217728 No
/dev/ramdisk/certfs 1048576 No
/dev/ramdisk/mydisk 2097152 Yes
EXIT STATUS
ramdiskadm returns the following exit values:
0
Successful completion.
>0
An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsr |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5), ramdisk(7D)
NOTES
The abilities of ramdiskadm and the privilege level of the person who uses the utility are controlled by the permissions of
/dev/ramdiskctl. Read access allows query operations, for example, listing device information. Write access is required to do any state-
changing operations, for example, creating or deleting ramdisks.
As shipped, /dev/ramdiskctl is owned by root, in group sys, and mode 0644, so all users can do query operations but only root can perform
state-changing operations. An administrator can give write access to non-privileged users, allowing them to add or delete ramdisks. How-
ever, granting such ability entails considerable risk; such privileges should be given only to a trusted group.
SunOS 5.10 25 Mar 2003 ramdiskadm(1M)