Basically I need to run a Unix script to find all folders in the directory /fss/fin, if it exists; then I have tar it and move to another directory /fs/fi.
This is my command so far:
find /fss/fin -type d -name "essbase" -print
Here I have directly mentioned the folder name essbase
. But instead, I would like to find all the folders in the /fss/fin
and use them all.
How do I find all folders in the /fss/fin
directory & tar them to move them to /fs/fi
?
Clarification 1:
Yes I need to find only all folders in the directory
/fss/fin
directory using a Unix shell script and tar them to another directory/fs/fi
.
Clarification 2:
I want to make it clear with the requirement. The Shell Script should contain:
- Find all the folders in the directory
/fss/fin
- Tar the folders
- Move the folders in another directory
/fs/fi
which is located on the servers11003232sz.net
- On user requests it should untar the Folders and move them back to the orignal directory
/fss/fin