Islam shehata
Islam shehata

Reputation: 3

copy content file to multi files in Linux

I want to copy the content of file in Multiple files have the same extension how to do that using linux command

I try Run the commond :

cat  t1.txt  >  /etc/apache2/site-available/*le-ssl.conf

and

echo  "hello"   > /etc/apache2/site-available/*le-ssl.conf

but Give me an error result " Ambiguous redirect"

Any ideas?

Upvotes: 0

Views: 196

Answers (1)

William Pursell
William Pursell

Reputation: 212238

A redirect will not duplicate a data stream. If you want multiple copies, use tee. For example:

< t1.txt tee /etc/apa.../*le-ssl.conf

Upvotes: 1

Related Questions