Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: emninger on November 03, 2015, 02:08:11 AM

Title: bulk symbolic linking - possible?
Post by: emninger on November 03, 2015, 02:08:11 AM
To have better looking fonts i'm playing around with fontconfig. Among other i have to "ln -s" a lot of files from /etc/conf/avail to /etc.conf.d. It's a PITA to do that one by one, so my question: Is there a way to do that as a bulk?

Thanks a lot in advance!
Title: Re: bulk symbolic linking - possible?
Post by: nitram on November 03, 2015, 02:22:41 AM
Rarely do i symbolic link more than a couple items at a time. Just did a quick test, however, and my file manager allows me to select multiple items, drag to destination directory and create multiple symbolic links at a time. So yes it's possible but my file manager source code doesn't utilize a single command to bulk link, it just calls the  ln -s  command repeatedly for every item selected. Will be interesting to hear what the experts say, but if you type  ln  into terminal none of the command options relate to bulk linking. There may be packages that provide this feature, but as mentioned for me it's built into my file manager.
Title: Re: bulk symbolic linking - possible?
Post by: emninger on November 03, 2015, 02:34:11 AM
So, you're working with a file manager? Which one? I'm doing all from the commandline up to now. I know Thunar (which i prefer: under slackware on a very powerful Samsung ultrabook i "stole" the crunchbang setup, but i changed openbox with fluxbox, which i largely prefer for its ease of configuration)) and pcmanfm (which is nice for lxde and as desktop creator in combo with openbox but not fluxbox), i tried them both - a bit - here in TCL. But i'm under the impression it's a bit against the philosophy. In the end, i removed them ...
Title: Re: bulk symbolic linking - possible?
Post by: Juanito on November 03, 2015, 03:03:31 AM
You can symlink multiple files at once (as long as you don't want to change their names) with emelfm.
Title: Re: bulk symbolic linking - possible?
Post by: emninger on November 03, 2015, 03:06:28 AM
You can symlink multiple files at once (as long as you don't want to change their names) with emelfm.

Thanks. I discovered it can be done by xfe too. Btw, which one out of the fm is the best compromise btween power and weigth?
Title: Re: bulk symbolic linking - possible?
Post by: Misalf on November 03, 2015, 03:08:29 AM
Code: [Select]
for i in /some/directory/* ; do ln -s $i /some/other/directory/ ; done

I like Xfe a lot. (;
Title: Re: bulk symbolic linking - possible?
Post by: curaga on November 03, 2015, 03:13:37 AM
ln -s file1 file2 file3 /into/directory
Title: Re: bulk symbolic linking - possible?
Post by: emninger on November 03, 2015, 04:44:17 AM
ln -s file1 file2 file3 /into/directory

But no placeholders ... Correct?
Title: Re: bulk symbolic linking - possible?
Post by: curaga on November 03, 2015, 11:28:11 AM
What do you mean by placeholders?
Title: Re: bulk symbolic linking - possible?
Post by: emninger on November 03, 2015, 12:46:31 PM
*
Title: Re: bulk symbolic linking - possible?
Post by: nitram on November 03, 2015, 12:47:08 PM
Correction, my bad. My File Manager (mfm.tcz) creates sym links like curaga's post above. Not a repeated loop, all at once listing files in a singe command. Of course, they all need to point to the same directory for each action.
Code: [Select]
      asprintf(&command, "mfmexec 'Soft linking...' '%s' 'ln -s -f -v %s %s 2>&1' &", path, file_list, dir_selected);

My File Manager (mfm.tcz) does soft linking but it's beta, just for fun.
Xfe is very nice, very configurable, almost overwhelming to me, yet still lightweight.
emelfm is extremely lightweight and does pretty much anything a basic file manager should.
Would be very surprised if Midnight Commander didn't do linking.
Just started playing around with worker (not in repo), does sym linking too.
Nice to have choices :)

Title: Re: bulk symbolic linking - possible?
Post by: emninger on November 04, 2015, 08:54:31 AM
Xfe is very nice, very configurable, almost overwhelming to me, yet still lightweight.
emelfm is extremely lightweight and does pretty much anything a basic file manager should.
Would be very surprised if Midnight Commander didn't do linking.
Just started playing around with worker (not in repo), does sym linking too.
Nice to have choices :)

You're sure? I checked emelfm2 and xfe with htop, and, seems xfe consumes less ram than emelfm2
Title: Re: bulk symbolic linking - possible?
Post by: Juanito on November 04, 2015, 09:52:28 AM
That was emelfm (gtk1) not emelfm2 (gtk2)
Title: Re: bulk symbolic linking - possible?
Post by: nitram on November 04, 2015, 12:53:09 PM
Total install size of emelfm (gtk1) is .88mb including dependenies, hard to beat considering it's features.
Even Fluff is 1.73mb installed and it doesn't do soft linking.