Hello i am trying to move all files with .hi
and .o
extension from a target folder /src
to another folder /Obj
So far i have tried:
srcpath=$(pwd)"/src"
ghc src/Main.hs > Logs/output.txt 2> Logs/Err.txt //this builds the project and generates the binaries and .hi files
mv *.hi *.o $srcpath/src/ Obj/ //i want to move all these files to Obj/ folder but where do i place the extension arguments?
How should the command be: mv extensions source dest ?
or mv source dest extensions
I have tried:
srcpath=$(pwd)"/src"
objpath=$(pwd)"/Obj"
ghc src/Company.hs > Logs/output.txt 2> Logs/Err.txt
mv *.o *.hi $srcpath $objpath
And i get the following error:
mv: cannot stat '*.o': No such file or directory
mv: cannot stat '*.hi': No such file or directory
mv: cannot move '/c/Users/[..]/src' to '/c/Users/[...]/Obj/src': Device or resource busy