Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 1 down vote accepted

One of these will work:

$ cd test
$ icontainer2icnssource.icontainer


$ cd test; icontainer2icnssource.icontainer


$ (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


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.