Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problem deleting file with special character Post 92038 by hart1165 on Wednesday 7th of December 2005 10:14:22 AM
Old 12-07-2005
Problem deleting file with special character

I'm having problems deleting a file with a special character and I'm hoping that somebody here can help. The file "-osample1.c" will not remove from my directory. Here is an example of what happens. Any ideas would be appreciated.

> ls *sample1*
ls: illegal option -- .
usage: ls -1ARadeCxmnlogrtucpFLbqisf [files]
> ls
-osample1.o demo_proc.mk makefile test.sh test1.c test1.o testing
asdf.log inst scripts test1 test1.lis test1.pc
> rm *sample1*
rm: illegal option -- o
rm: illegal option -- s
rm: illegal option -- a
rm: illegal option -- m
rm: illegal option -- p
rm: illegal option -- l
rm: illegal option -- e
rm: illegal option -- 1
rm: illegal option -- .
rm: illegal option -- o
Usage: rm [-Rfir] file ...
> rm -osample1.o
rm: illegal option -- o
rm: illegal option -- s
rm: illegal option -- a
rm: illegal option -- m
rm: illegal option -- p
rm: illegal option -- l
rm: illegal option -- e
rm: illegal option -- 1
rm: illegal option -- .
rm: illegal option -- o
Usage: rm [-Rfir] file ...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete a special character in file

hi i want to delete a particular character in file. example file name:abcsample abc=bbbqw3/ hidh=ajjqiwio4/ xyx=hakjp/ ........../ ......./ i want to delete that special character (/) in abcsample file.please give the required commands for my requirement. thank you (3 Replies)
Discussion started by: srivsn
3 Replies

2. Shell Programming and Scripting

delete a special character in file

hi i want to delete a particular character in file. example file name:abcsample abc=bbbqw3/ hidh=ajjqiwio4/ xyx=hakjp/ ........../ ......./ i want to delete that special character (/) in abcsample file Permnently.please give the required commands for my requirement. required... (1 Reply)
Discussion started by: srivsn
1 Replies

3. UNIX for Dummies Questions & Answers

Special character in my file

I have a special character in my file. It displays as a '#' sign but when I do this command I do not find the line. fgrep 'G#ant' file1 I want to replace the special character with another value but I need to know what character it really is. Any ideas on how to replace this '#' value with... (3 Replies)
Discussion started by: Ryan2786
3 Replies

4. Shell Programming and Scripting

deleting a special file

Hi, I have FTP'd a file two times from windows to unix machine. The second file is coming as bbmenu (2). I want to delete this file but it is not getting deleted. Kindly let me know the way how i can do that. Thanks Namish (2 Replies)
Discussion started by: namishtiwari
2 Replies

5. Shell Programming and Scripting

parse a file for a special character

hello, How to parse a file to see if a specific line is commented by '#' character? filename: file1 cat file1 ... # /usr/bin/whatever ... thank you (9 Replies)
Discussion started by: melanie_pfefer
9 Replies

6. Shell Programming and Scripting

Deleting all characters from 350th character to 450th character from the log file

Hi All, I have a big log file i want to delete all characters (between 350th to 450th characters) starting at 350th character position to 450th character position. please advice or sample code. (6 Replies)
Discussion started by: rajeshorpu
6 Replies

7. Shell Programming and Scripting

Removing Special Character from File.

Hi, My file has this special character "^M" I would like to remove this characters. eg: abc,abc,^M i tried using sed but doesnt work. i used octal dump command to see special character it returns following: 015 \r Appreciate your reply. (6 Replies)
Discussion started by: pinnacle
6 Replies

8. Programming

Problem with control file and special character

I am getting error when loading data file using ctl file. I get this error only when there is special character. Below is some data. DataFile=> company_id|ciu_id|english_name|iso_country_code|active|partner_name 1-2JT-122||Expert Järvenpää|FI|A|Expert Järvenpää Control File=> LOAD DATA... (1 Reply)
Discussion started by: rshivarkar
1 Replies

9. Red Hat

Special character ^@ in CSV file

All, I am having a tough time with Linux and CSV file. My CSV file gets generated from Cognos on Linux machine that contains special characters. At first instance when I do vi <filename> to that file, I can't see anything. I did tail -2 and redirected to another temp file and did vi <filename>,... (2 Replies)
Discussion started by: donadarsh
2 Replies
div(3C) 																   div(3C)

NAME
div(), ldiv(), lldiv(), imaxdiv() - integer division and remainder SYNOPSIS
DESCRIPTION
Computes the quotient and remainder of the division of the numerator numer by the denominator denom. If the division is inexact, the sign of the resulting quotient is that of the algebraic quotient, and the magnitude of the resulting quotient is the largest integer less than the magnitude of the algebraic quo- tient. If the result can be represented, the result is returned in a structure of type (defined in having members quot and rem for the quotient and remainder respectively. Both members have type and values such that quot denom rem numer. If the result cannot be represented, the behavior is undefined. Similar to except that the arguments each have type and the result is returned in a structure of type (defined in having members quot and rem for the quotient and remainder respectively. Similar to except that the arguments each have type and the result is returned in a structure of type (defined in having members quot and rem for the quotient and remainder respectively. Similar to except that the arguments each have type and the result is returned in a structure of type (defined in having members quot and rem for the quotient and remainder respectively. WARNINGS
Behavior is undefined if denom is zero. SEE ALSO
floor(3M), thread_safety(5). STANDARDS CONFORMANCE
div(3C)
All times are GMT -4. The time now is 07:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy