11-28-2001
the text file under unix is fifferent from m$ DOS,
if you use ftp to exchange text files between them, you should always use ascii model;
if you use mcopy u should always add the -t switch
or you may use this to trim the '^M' charater under unix if you already cp'ed the text file to unix:
tr -d "\015" < hello.c > hello.unix.c
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I am facing a strange situation and want to find why it is occuring . When i convert the whole line into Hexadecimal character i can find the junk value after new line (\n) . If i look in binary mode it is not visible.
PLease let me know how possible the junk character is added... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I have two AIX 5.3 servers that are supposedly set up exactly the same. The problem I am having is on one of the servers, it seems dynamic routes are being added mysteriously and non-periodically. This only happens on one server and not the other. Also, there doesn't seem to be a specific... (1 Reply)
Discussion started by: Conutmonky
1 Replies
3. Programming
Hi all,
I got trouble with reading and writing ( to standard input/output, file, socket whatever...).
I will briefly describe it by giving this example. I want to read a long string from keyboard but i don't know how long it is b4. So i need to know the number of character i will read first.... (6 Replies)
Discussion started by: tazan_007
6 Replies
4. UNIX for Advanced & Expert Users
I've posted about this before, but only recently narrowed the problem down to a specific cause.
Ok, first of all, the behavior:
It occurs when autocompletion brings up its list (not when there is only a single option). Basically, if I were to type, say,
cd ~/<TAB>
I would get something... (2 Replies)
Discussion started by: marshaul
2 Replies
5. Solaris
i am trying to patch a solaris 10 server using live upgrade.
issue is, when i create a new BE and activate it during reboot the file system that are mounted but doesnt have an entry in vfstab are automatically added in vfstab of new BE.
looks like live upgrade uses df -h output as reference... (0 Replies)
Discussion started by: chidori
0 Replies
6. Shell Programming and Scripting
Hi all,
I executed this script
top -n 1 | awk '{ if (NR==3) print $2 }'and it will give me in console
'31.6%us,'however, if I put the same script in txt file
top -n 1 | awk '{ if (NR==3) print $2 }' >> test.txtwhen I open the test.txt
I see
31.6%ESC(BESCI just actually need the 31.6 % to be... (1 Reply)
Discussion started by: peuceul
1 Replies
7. Shell Programming and Scripting
Dear All,
I have a directory when i received files by means of FTP, i want to invoke my shell scripts as soon as file hit the directory, if the files hit 10 times then the shell scripts should also get executed 10 times.
thanks
rajesh (1 Reply)
Discussion started by: guddu_12
1 Replies
8. Shell Programming and Scripting
Write a unix script to do the following automatically-
1. Identify the latest path version directory under: /data/cs/chk. The latest at this time is 15_1_3.
/data/cs/chk
…
drwxr-x--- 2 dba tms 4096 Jan 22 11:18 15_1_2
drwxr-x--- 2 dba tms 4096 Jan 22 11:18 15_1_3
2. Check for any new... (1 Reply)
Discussion started by: roy1912
1 Replies
9. Shell Programming and Scripting
Hi,
I am trying to sort a csv file which has say 10 lines each line having a row size that is upto 30183 no. of COLUMNS (Row length = 30183). There is a LINE FEED (LF) at the end of each line. When I try to sort this file say, based on the second FIELD using the below command,
sort -t ',' +1... (5 Replies)
Discussion started by: DHeisenberg
5 Replies
10. IP Networking
RHEL 7.0, IPV6
Scenario:
I have routed specific network using network scripts.
1. "ip -6 route show" shows that route has been added. ( with metric 1024)
2. Ping of the specific IP through that route is successful.
3. Now after few days, for some reason, we see that cache route appears for... (3 Replies)
Discussion started by: msr1981
3 Replies
mcopy(1) General Commands Manual mcopy(1)
Name
mcopy - copy MSDOS files to/from Unix
Note of warning
This manpage has been automatically generated from mtools's texinfo documentation, and may not be entirely accurate or complete. See the
end of this man page for details.
Description
The mcopy command is used to copy MS-DOS files to and from Unix. It uses the following syntax:
mcopy [-bspanvmQT] [-D clash_option] sourcefile targetfile
mcopy [-bspanvmQT] [-D clash_option] sourcefile [ sourcefiles... ] targetdirectory
mcopy [-tnvm] MSDOSsourcefile
Mcopy copies the specified file to the named file, or copies multiple files to the named directory. The source and target can be either
MS-DOS or Unix files.
The use of a drive letter designation on the MS-DOS files, 'a:' for example, determines the direction of the transfer. A missing drive
designation implies a Unix file whose path starts in the current directory. If a source drive letter is specified with no attached file
name (e.g. mcopy a: .), all files are copied from that drive.
If only a single, MS-DOS source parameter is provided (e.g. "mcopy a:foo.exe"), an implied destination of the current directory (`.') is
assumed.
A filename of `-' means standard input or standard output, depending on its position on the command line.
Mcopy accepts the following command line options:
t Text file transfer. Mcopy translates incoming carriage return/line feeds to line feeds when copying from MS-DOS to Unix, and vice-
versa when copying from Unix to MS-DOS.
b Batch mode. Optimized for huge recursive copies, but less secure if a crash happens during the copy.
s Recursive copy. Also copies directories and their contents
p Preserves the attributes of the copied files
Q When mcopying multiple files, quits as soon as one copy fails (for example due to lacking storage space on the target disk)
a Text (ASCII) file transfer. ASCII translates incoming carriage return/line feeds to line feeds.
T Text (ASCII) file transfer with character set conversion. Differs from -a in the ASCII also translates incoming PC-8 characters to
ISO-8859-1 equivalents as far as possible. When reading DOS files, untranslatable characters are replaced by '#'; when writing DOS
files, untranslatable characters are replaced by '.'.
n No confirmation when overwriting Unix files. ASCII doesn't warn the user when overwriting an existing Unix file. If the target file
already exists, and the -n option is not in effect, mcopy asks whether to overwrite the file or to rename the new file (`name
clashes') for details). In order to switch off confirmation for DOS files, use -o.
m Preserve the file modification time.
v Verbose. Displays the name of each file as it is copied.
Bugs
Unlike MS-DOS, the '+' operator (append) from MS-DOS is not supported. However, you may use mtype to produce the same effect:
mtype a:file1 a:file2 a:file3 >unixfile
mtype a:file1 a:file2 a:file3 | mcopy - a:msdosfile
See Also
Mtools' texinfo doc
Viewing the texi doc
This manpage has been automatically generated from mtools's texinfo documentation. However, this process is only approximative, and some
items, such as crossreferences, footnotes and indices are lost in this translation process. Indeed, these items have no appropriate repre-
sentation in the manpage format. Moreover, not all information has been translated into the manpage version. Thus I strongly advise you
to use the original texinfo doc. See the end of this manpage for instructions how to view the texinfo doc.
* To generate a printable copy from the texinfo doc, run the following commands:
./configure; make dvi; dvips mtools.dvi
* To generate a html copy, run:
./configure; make html
A premade html can be found at `http://www.gnu.org/software/mtools/manual/mtools.html'
* To generate an info copy (browsable using emacs' info mode), run:
./configure; make info
The texinfo doc looks most pretty when printed or as html. Indeed, in the info version certain examples are difficult to read due to the
quoting conventions used in info.
mtools-4.0.13 28Feb10 mcopy(1)