Hi,
Im trying to make a script which untar's a particular .gz file into a directory like /usr/local/src/
and then chown's the source directory using my Username
for eg:
Code:
#!/bin/sh
tar -xvzf abcd.gz -C /usr/local/src/
chown -R username.username /usr/local/src/abcd
Is it possible, as I normally have made a dir /home/username/software to download all source files and then untar it into /usr/local/src/. The problem comes up when I untar the .gz file as /usr/local/src/ is owned by root and I dont want to untar any file as root and then compile it.
Thanks
Danish