bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cp command potental problem


From: Doug Stamford
Subject: cp command potental problem
Date: Wed, 17 Jun 2009 11:54:01 -0400

One of my co-workers brought to my attention a most unusual problem with
the cp command. Originally, this problem was discovered on a AIX system
but he also found this problem exist on the Linux system. He contacted
IBM directly to inform them, but was told the cp command was functioning
properly.

 

The problem on occurs when using the cp command and there are only 2
source files and the '*' is used, and the destination is inadvertently
left off. 

 

Example:

 

mkdir test

 

cat /etc/snmp/snmpd.conf > test/file1.txt

 

cat /usr/local/apache/conf/httpd.conf > test/file2.txt

 

cp test/*.txt <enter>

 

You will now notice no error output and the file2.txt is the same as
file1.txt

 

 

Doug Stamford

Winn-Dixie Stores, Inc.

IT Production Support

(904) 370-6394

address@hidden

 

Good Judgment comes from experience. Unfortunately, experience usually
comes from bad judgement.

 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]