|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Copy files from a dir to a new one
I need to write a Bourne shell script to do the following:
(i)Copy a *.java and *.c files in /Home/MyHomeDir to a directory called /Home/MyHomeDir/NewDir (ii)Make all the files executable and readable by everyone |
|
#2
|
|||
|
|||
|
#!/bin/sh
cp $HOME/*.java $HOME/new cp $HOME/*.c $HOME/new chmod 777 $HOME/new/*.c chmod 777 $HOME/new/*.java |
|
#3
|
|||
|
|||
|
Thanks it works perfectly!!
|
|
#4
|
|||
|
|||
|
this perfecty && accidentally work
in unix, i would say cd #this bingt me to home [ -d ../new ] || mkdir ../new || exit 1 cp *.java *.c ../new #he said: executable and readable by everyone chmod 755 ../new/*.java ../new/*.c ALL other is hazard (but working IN YOUR ENVIRONMENT) |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Copy files from a dir to a new one |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|