Ubuntu – How to collect all svg icons from the computer

iconsinkscapesvg

I want to make use of all the icons which are installed on my computer to make art, posters and designs, what is the best way of making them all easily browsable from inkscape?

Best Answer

If you want to make a copy of them all in to one directory try the following:

sudo updatedb
mkdir $HOME/svg
locate *.svg | awk -F'/' '{X=NF-1;Y=NF-2;Z=NF-3}{ system("cp "$0" '$HOME'/svg/"$Z"\"-\""$Y"\"-\""$X"\"-\""$NF) }'

That will copy all SVG files into an svg folder in your home. You can of course adjust those paths as needed. Since a lot of the System SVG's (Icon sets) are the same name among theme. This will copy them into the SVG folder like so:

This /usr/share/icons/Humanity/actions/22/mail-read.svg becomes ~/svg/Humanity-actions-22-mail-read.svg meaning you can view them in one Nautilus folder without having to traverse often cumbersome directory structures.

Another alternative - to keep all your SVGs in the same location, but have them update when theme icon-sets get updated - would be to symlink them all to that folder. As long as you performed a "Save-As" instead of overwriting icons when working on them:

sudo updatedb
mkdir $HOME/svg
locate *.svg | awk -F'/' '{X=NF-1;Y=NF-2;Z=NF-3}{ system("ln -s "$0" '$HOME'/svg/"$Z"\"-\""$Y"\"-\""$X"\"-\""$NF) }'