02-15-2008
A single dot refers to the current directory, so:
$ rm ./-annoying-file.txt
also works.
10 More Discussions You Might Find Interesting
1. Programming
I have a number of files of the format filename.xfr_mmddyy_%H%M%S which i get in a specified directory daily. Now i want to search in the specified directory & delete the files which are more than 2 days old .So I use a command
find $DIR/backup/* -ctime +2 -exec rm -f {} \;
But after executing... (1 Reply)
Discussion started by: dharmesht
1 Replies
2. UNIX for Dummies Questions & Answers
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... (2 Replies)
Discussion started by: hart1165
2 Replies
3. UNIX for Dummies Questions & Answers
All,
I am trying to delete a user created file from specified folder. This folder is using for my Team member (i.e, Public folder). For example,
$ ls -l
total 1336
-rw-rw-r-- 1 g_btha customer 2655 Dec 06 12:35 A_COL_1001
While deleting/moving this file I am getting the following... (3 Replies)
Discussion started by: nvkuriseti
3 Replies
4. UNIX for Dummies Questions & Answers
Hello:
I made this mistake on my tru64 machine, I renamed a file from:
binary.errlog to binary.errlog(B3)
now when im tryign to move or delete the file Im getting:
# rm binary.errlog(B3)
ksh: syntax error: `(' unexpected
4# mv binary.errlog(B3) log
ksh: syntax error: `(' unexpected
... (3 Replies)
Discussion started by: aladdin
3 Replies
5. UNIX for Dummies Questions & Answers
Hi ,
In a particular path the below mentioned three files has been created.
-rw-r--r-- 1 edwprod edw 0 Jun 5 00:06 -f%*lock.clock
-rw-r--r-- 1 edwprod edw 151 Jun 5 00:06 -f.log
-rw-r--r-- 1 edwprod edw 4 Jun 5 00:06 -f%conn_err.out
... (5 Replies)
Discussion started by: anupam_jash
5 Replies
6. Shell Programming and Scripting
Hi All
I am not able to delete few line from long file.
I have a big file which is of 53998 B in size i want to delete lines starting from 32768 to 53998 and collect remaining file in new file.
It is giving exception
sed: command garbled: 32768,$countd
Please find the sample script... (2 Replies)
Discussion started by: rajeshorpu
2 Replies
7. Shell Programming and Scripting
Hi,
I have a folder A which contains files 1,2,3... I also have a file xyz under a diff folder B containg the entries 1,2,3...
I am trying to compare and delete the nonexisting ones from xyz using the below code:
QFILE=/B/xyz
cd A
ls -1 > /tmp/file1
for fname in `cat $QFILE`
do
if ... (4 Replies)
Discussion started by: swasid
4 Replies
8. Shell Programming and Scripting
Hi Guys,
In one of my folders i have 10000 log files starting with sqlfile.....
Iam trying to delete the log files alone from the folder using for loop but i am getting an error
ksh: /usr/bin/ls: 0403-027 The parameter list is too long.
For loop i used
for i in `ls sqlfile*`... (4 Replies)
Discussion started by: mac4rfree
4 Replies
9. UNIX for Advanced & Expert Users
hi,
1. When i am deleting file in the linux machine i am getting below error message.
rm text.fil
rm: remove regular file `text.fil'? y
rm: cannot remove `text.fil': Read-only file system
From su also i tried i am getting same error message.
2. Some times the file permissions and user name... (1 Reply)
Discussion started by: coconut.ramu
1 Replies
10. UNIX Desktop Questions & Answers
Hi, everybody!
I have a big problem. I don't understand Unix, but I work as a system administrator, and sometimes I make some data exports and I have to delete old .dmp files, but today I had a mistake, I wrote rm * 909*
This is a part of my folder contents in unix before deleting
drwxrwxr-x 2... (4 Replies)
Discussion started by: susan12
4 Replies
LEARN ABOUT REDHAT
dos2unix
dos2unix(1) General Commands Manual dos2unix(1)
NAME
dos2unix - DOS/MAC to UNIX text file format converter
SYNOPSYS
dos2unix [options] [-c convmode] [-o file ...] [-n infile outfile ...]
Options:
[-hkqV] [--help] [--keepdate] [--quiet] [--version]
DESCRIPTION
This manual page documents dos2unix, the program that converts plain text files in DOS/MAC format to UNIX format.
OPTIONS
The following options are available:
-h --help
Print online help.
-k --keepdate
Keep the date stamp of output file same as input file.
-q --quiet
Quiet mode. Suppress all warning and messages.
-V --version
Prints version information.
-c --convmode convmode
Sets conversion mode. Simulates dos2unix under SunOS.
-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.
-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be
used or you WILL lost your files.
EXAMPLES
Get input from stdin and write output to stdout.
dos2unix
Convert and replace a.txt. Convert and replace b.txt.
dos2unix a.txt b.txt
dos2unix -o a.txt b.txt
Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode. Convert c.txt from Mac to Unix
ascii format.
dos2unix a.txt -c iso b.txt
dos2unix -c ascii a.txt -c iso b.txt
dos2unix -c mac a.txt b.txt
Convert and replace a.txt while keeping original date stamp.
dos2unix -k a.txt
dos2unix -k -o a.txt
Convert a.txt and write to e.txt.
dos2unix -n a.txt e.txt
Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.
dos2unix -k -n a.txt e.txt
Convert and replace a.txt. Convert b.txt and write to e.txt.
dos2unix a.txt -n b.txt e.txt
dos2unix -o a.txt -n b.txt e.txt
Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.
dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
DIAGNOSTICS
BUGS
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.
AUTHORS
Benjamin Lin - <blin@socs.uts.edu.au>
Bernd Johannes Wuebben (mac2unix mode) <wuebben@kde.org>
MISCELLANY
Tested environment:
Linux 1.2.0 with GNU C 2.5.8
SunOS 4.1.3 with GNU C 2.6.3
MS-DOS 6.20 with Borland C++ 4.02
Suggestions and bug reports are welcome.
SEE ALSO
unix2dos(1) mac2unix(1)
1995.03.31 dos2unix v3.0 dos2unix(1)