Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I found a problem using libicns's icontainer2icns command, it doesn't have an option to specify output folder but just put all extracted .icns files in current working directory.

For example, there is a file named "source.icontainer" under "/home/user/test"

user@localhost:/home/user$ icontainer2icns test/source.icontainer

Running above command will resulted in all .icns files be extracted to /home/user but not /home/user/test folder.

Is there a way to redirect all extracted files to whatever folder i specify?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

One of these will work:

$ cd test
$ icontainer2icnssource.icontainer

or:

$ cd test; icontainer2icnssource.icontainer

or:

$ (cd test; icontainer2icnssource.icontainer)

That one will do what you want and leave you back in the directory you started from since it's executed in a subshell.

If you're using Bash, the next one will also do that, but it's not portable to some other shells:

$ pushd test; icontainer2icnssource.icontainer; popd
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.