-
last1
how can I find which file names exist in two different directories ? ( and remove it from directory1 if it also exists in directory 2 )
-
ngortheone
something along the lines of: for f in dir1/*; do test -f dir2/$ && rm dir1/$f; done
-
jgh_
basename $f
-
ngortheone
this will only remove file from dir1 if similarly named file exists in dir2
-
jgh_
and just let the rm fail on nonexist
-
ngortheone
jgh_ is right, you can do: for f in dir1/*; do test -f dir2/$(basename f$) && echo "file $(basename $f) exists in both dirs" && rm dir1/$(basename $f); done
-
last1
nice, I had started using fdupes but I think it also compares file contents
-
ek
You could toss an "if [ $? -gt 0 ]; then" in there to avoid the rm's that would fail.
-
ngortheone
jgh_ given that you need to delete from dir1 how would you just let the rm fail on nonexist
-
last1
jgh: is that tcsh or sh ?
-
ngortheone
sh
-
jgh_
just miss out the test ... &&
-
jgh_
(I assume you don't really care about the echo)
-
ngortheone
last1: there are many ways to skin this cat. names being equal doesn't mean files are the same. You might want to caclulate sha1 at least to be sure
-
ngortheone
but it all depends on your usecase
-
last1
I really just care about the names
-
ngortheone
jgh_ is your solution then to iterate over dir2 and rm -f $file from dir1?
-
jgh_
with basename, yup
-
ngortheone
that would work too, rm -v to print out dupes, if accounting of deleted files is important
-
ngortheone
last1: so the hivemind solution is
-
ngortheone
for f in dir2/* ; do rm -v dir1/$(basename $f); done
-
ngortheone
rm -vf to avoid error message
-
jgh_
'night y'all
-
meena
rm -f never fails.
-
ngortheone
-f not to avoid failure, but to avoid annyoing message "file does not exist"
-
yuripv
it's both
-
moon-child
I have a linux app which is running out of open fds. I have raised the open file limit to a truly absurd 500m, but it still happens. Is it possible I need to set the limit in a different way for linux apps?
-
parv
(500m) lol💩
-
parv
That point had come up recently (somewhere?). Only point I remember is that FreeBSD has too low of a default
-
moon-child
if I run /compat/linux/bin/bash, then ulimit -n is a paltry 1024. If I raise it to 500m from the linux bash, and then run the application again, I have the same problem. But perhaps something in the linuxulator exec process breaks this?
-
moon-child
do I need to trick the application into running setrlimit itself?
-
parv
-
moon-child
I don't that will be helpful for the linuxulator
-
parv
If the application has the some setting to control the number of open files ...
-
moon-child
I'm fine with its opening as many files as it wants. I want to be able to raise the limits to allow that
-
meena
the problem is that we're working thru layers
-
moon-child
ah, seems perhaps I want compat.linux.default_openfiles
-
meena
that a sysctl?
-
moon-child
yeah
-
meena
what's it say
-
moon-child
nothing interesting. 'Default soft openfiles resource limit, or -1 for unlimited'
-
moon-child
now it hangs on startup. Improvement?
-
meena
what did you set it to?
-
parv
Is it possible to create a ZFS mirror out of 2 RAIDZ pools?
-
moon-child
-1. But an intermediate of 1000000 seems fine so far
-
parv
-
VimDiesel
Title: Shad: "fellow techies, I have a zpool with a raidz2 of s…" - LGBTQIA+ Tech Mastodon
-
meena
moon-child: there's every chance that Linux and FreeBSD have a different understanding of how big unlimited is, and do it's getting lost in translation (integer conversion)
-
moon-child
this is a purely freebsd-specific thing, though
-
meena
-
VimDiesel
Title: Mina: "c" - Cathode Church
-
meena
moon-child: and you think it's completely tested and error free, too?
-
moon-child
I never said that
-
moon-child
regardless, my problem now is no audio. Much less fun
-
moon-child
perhaps I'll compile my own sdl and tell it to use oss
-
meena
fun.
-
moon-child
not really. Computers always suck at audio, ime
-
moon-child
and now I have to work out how to set up a linux toolchain, too...
-
meena
yeah, I had to share rooms with my patents, later with my brother where my computer was during school, so installing Linux on it, fixed the computer is making sound problems back in the day
-
meena
would always catch me out, when it actually worked, and i had to mute it!
-
meena
even today, none of my devices make sound, unless i want to / have headphones
-
yuripv
sharing a room with my patents is nice, as i have none
-
meena
yuripv: see, these days I'm a patent myself, but i don't have to share my room with my… accomplishment, because we're not that poor / live 300 years ago
-
yuripv
sorry, just making a joke from your typo
-
meena
the amount of times this stupid keyboard interprets patent when I'm trying to write parent is infuriating, and i don't understand why i haven't removed it from predictions yet
-
yuripv
:)
-
meena
I imagine somebody at Microsoft sitting at day at a dictionary and giving weights to words that have the same swype pattern, and going, yes, patent is definitely written way more than parent
-
» moon-child grumbles
-
moon-child
apparently cc _does_ work in a linuxulator chroot. But linux-c7-devtools does not come with make
-
moon-child
and apparently gnu make wants to be built with gnu make. Hilarious
-
AmyMalik
wind turbine
-
moon-child
oh, no, it does come with a shellscript
-
meena
moon-child: which Software is this
-
moon-child
celesgte
-
moon-child
celeste*
-
» meena recommends getting a PlayStation, which is FreeBSD based…
-
moon-child
playstation is expensive and can't do much
-
moon-child
really, I ought to be able to do this without linuxulator, as it is a c# app. But it relies on a closedsource c lib (fmod). If I had more patience I'd userspace-shim it
-
debdrup
jbo: I hope my reply didn't come too late.
-
PredatorONormies
Any reason why temperature readings on 1 FreeBSD install would suddendly go away? I think they were there in the past
-
PredatorONormies
loading amd_temp or whatever it's called works though. Any idea why it's not loaded by default, or perhaps it faulted somehow and went offline?
-
PredatorONormies
amdtemp
-
scoobybejesus
does anyone know ocaml? when i run `opam install mad`, it will fail because `The compilation of conf-mad.1 failed at "pkg-config --exists mad".` which returns `1`. Of course `pkg-config --exists libmad` returns `0`. This used to work with 4.12.0. Same problem with 14.4.1
-
Serpent7776
scoobybejesus: Are you sure it used to work? It seems conf-mad lacks support for FreeBSD
github.com/ocaml/opam-repository/bl…r/packages/conf-mad/conf-mad.1/opam
-
VimDiesel
Title: opam-repository/opam at master · ocaml/opam-repository · GitHub
-
Serpent7776
You might want to ask on #ocaml
-
scoobybejesus
thank you for the help. I think it didn't used to be a dependency of the opam mad package
-
Serpent7776
Ah, it might be the case that it didn't depend on the system package previously
-
thumbs
31/
-
thumbs
hrm, sorry
-
mason
thumbs: Shockingly, you're not in my /31 at all.
-
thumbs
mason: this is /30
-
mason
/11 here
-
mason
alt alt-q
-
mason
or*