Quote:
|
Originally Posted by nagomes
Hello,
I have files in a dir.
I what to create a FOR cycle that will do this
FOR <condition> do
file=`ls <directory> | tail -1`
echo $file
mv -f $file <another dir>
done
What I want to now is what should I put in the <condition>. The condition I want is that the FOR will execute until there is no more files in the directory
Thanks
|
If you want to move all files from one directory to another
Code:
mv -f /dir1/* /dir2