00:00:03 it's counting binary files too 00:01:04 Do you have a file name pattern to restrict to? 00:01:17 If this is source code you might want to use sloccount instead anyway. 00:01:21 nope 00:01:48 find . -name '*.[chyl]' -exec wc -l {} + 00:02:08 find . \( -name '*.txt' -o -name '*.html' \) -exec wc -l {} + 00:02:16 Just examples... 00:03:10 How would you differentiate between files you wish to count and files you do not wish to count? If you can state the recipe then almost certainly it can be done. 00:13:38 just need a text type included and other types ignored 00:13:51 so using file cmd to detect type? 00:46:43 sure, so find ... | xargs file, look at the output of that, see which ones you want 00:47:30 then pipe it to more things to search for that pattern 01:02:51 sum the wc -l of the paths returned by find . -type f -exec file {} \; grep -E 'ASCII text|UTF-8 text' 01:09:22 well, once you've got those file results, they each look like "/some/file/name: ASCII text" or so 01:09:49 you need to peel off the colon and everything after it; cut(1) can do that 01:11:17 (if you haven't encountered it before, "foo(1)" means foo is in section 1 of the manual; you can read that with "man 1 foo") 01:14:14 tried cut -f 1 -d ': ' but it said bad delimiter 01:14:52 try -d: 01:15:04 i think you only get to specify one character and ': ' is two characters 01:15:23 or -d ':' without a space should do the same 01:15:31 cut -f 1 -d ':' worked 01:15:43 hurrah! now you have just a list of filenames, right? 01:15:48 paths ya 01:15:52 recursive 01:15:57 cool, so you can pipe it to xargs wc -l 01:16:22 it auto totals too, dang nice 01:16:43 o/ 01:17:19 full cmd is find . -type f -exec file {} \; | grep -E 'ASCII text|UTF-8' | cut -f 1 -d ':' | xargs wc -l 01:17:31 *seems* to work pretty flawlessly 01:17:36 can find any fault in it? 01:18:10 if you have any filenames with spaces in them, that'll gum it up 01:18:22 if you have any filenames with *colons* in them, that'll *really* gum it up :) 01:18:31 i don't but any way to fix that? 01:18:43 any easy way 01:19:23 for spacessss -- ok so i never use find's -exec. there may be something that find by itself can do there 01:19:40 but so usually i have a command like find [...] | xargs do_a_thing 01:19:56 and if i turn it into find [...] -print0 | xargs -0 do_a_thing 01:20:46 then that makes find output its filenames delimited by null characters instead of newlines, and it makes xargs expect that filenames will be separated by null characters instead of whitespace 01:22:11 but when you run file on your filenames, it's not going to delimit *its* output with nulls, ... hmm 01:22:26 WHAT 01:22:37 file has a -0 switch 01:23:35 but grep doesn't 01:24:20 anyway, sometimes i end up tucking a perl -pe 's/\n/\0/g' or perl -pe 's/\0/\n/g' in my pipeline to translate back and forth between newlines and nulls as needed 01:25:23 you might be able to do that more simply with tr or sed instead, but perl was the first thing i found that understood me when i said \0 01:27:05 jaredj: tr '\n' '\0' 01:27:14 anyway. yeah one of the things i hate about *nix shell parameters/input/output is that the simplest way to say it can fail in some corner cases, and the safest way to say it lacks simplicity 01:27:23 zwr: yeah figures lol 01:29:29 zwr: today i learned a simpler way. thanks! :) 01:31:52 Would it be easier to upgrade from 13.3Rp5 to 14.1R or go to 14.0R and then 14.1R ? 01:34:45 i always fresh upgrade between major versions just saying 01:34:58 fresh install, not upgrade 01:38:08 mns i think i've gone from 13.x to 14.1. it worked for me 01:39:24 jaredj ty for help on line counter btw 01:39:56 sure thing :) 01:40:42 jaredj: thanks. that helps. 01:43:28 polyex: I used to do that, once upon a time, when upgrade tools were not always stable (on linux, back around Red Hat 4 and Yellow Dog Linux/ppc). Once I switched to Debian and I could use apt-get to do upgrades, I don't think I've done fresh installs in the last 26+ years. 01:43:49 i'll try forever upgrades after pkgbase is default 01:44:51 With FreeBSD I've always upgraded to the latest RELEASE version. Just this time around, for some reason, I didn't upgrade to 14.0 and now I'm behind, so just wanted to check-in. 01:45:29 polyex: what's pkgbase? 01:47:38 oohoohoo 01:48:27 ok so base is ... i mean, you've got options like lib32, compilers, whatnot. but they all belong to a single build and whichever ones you have installed, you have to upgrade at upgrade time 01:49:08 yes that's base. I thought pkgbase was something different, is it not? 01:49:32 and unless you build your own (say, for example with Michael Dexter's occambsd), you have, like, the Mellanox Infiniband configuration tool in /usr/sbin, even if you don't need it. 01:50:17 the idea of pkgbase is to package everything in base, and then be able to upgrade each thing as a package 01:50:31 and maybe not have all the packages installed 01:50:33 ya modularize base into separate packages 01:51:01 the effort has surged and flagged several times, i believe 01:51:34 iXSystems was working on it, for example, before they moved most of their future efforts in a more Linuxly direction 01:52:09 that was like five years ago 01:52:21 afk 01:58:35 So, I asked this last night but got no response before I (and my computer) fell asleep,  `zfs unmount -f /j/s/web` gets me a "cannot unmount '/j/s/web': pool or dataset is busy". Is there a way to .. really force the umount? Or should I just reboot? 02:02:32 gh00p: why not shutdown the process that is locking up the mount so that its a clean shutdown? 02:02:52 jaredj: thanks for the explanation, that makes sense. 02:25:55 Wups, I disconnected. Darn web client. 02:25:59 mns, if I knew what process that was, I would. fstat doesn't report any use of that filesystem. The `-f` should unmount it anyway, despite blocking processes, but it does not. 03:13:38 hello i was wondering how i could change the default volume on my freebsd installation, whenever i boot up, the volume is at 86 and sadly i fail to notice that before listening to music and having my ear drums getting close to ruptured. 03:15:13 i have tried setting hw.snd.vpc_0db="20" in /etc/sysctl.conf however it does not seem to work 03:29:00 another question i have is how i can disable "natural scrolling" on my laptop's trackpad 04:22:10 unrealapex: x or wayland? 04:22:22 xorg 04:25:30 Option "NaturalScrolling" "false" 04:31:03 i tried putting this in /usr/local/etc/X11/xorg.conf.d/90-trackpad.conf, however, it looks like it's still enabled https://0x0.st/XJGu.conf 04:31:16 just run mixer on crontabs @reboot 04:31:43 or whatever command to change the volume you use 04:34:20 would there be someday to do this in the kernel like i've tried or would using a crontab be a better way to go about this? 04:35:54 from what I know, running mixer should store the values 04:36:07 I'll see if /etc/rc.d/mixer has any clues 04:37:03 i'm trying to configure an nginx server inside a jail, and i think i'm completely lost 04:37:08 nope 04:37:32 why 86 out of every other possible value the maintainers could have set for the volume? 04:37:38 well, mostly lost. i have the jail running, but it can't access the internet from inside the jail 04:37:55 i feel like something around 40 would be more reasonable :/ 04:38:47 I mean, mines at 100 and I can barely hear anything 04:38:55 you have a really good soundsystem 04:41:33 what parts of the configuration could be causing this issue? aside from the jail, i configured most of the server just following the handbook 04:42:11 (which is an excellent resource, btw, with the exception of the section on jails, which is out of date and incomplete) 04:43:38 I connected ear buds to my computer whichi was probably the issue :( 04:44:11 I'll write a crontab and see if that fixes this issue :) 04:44:48 I mean, you're writing the crontab because the issue can't be fixed :( 04:45:30 ah 04:45:35 unrealapex: sound.4 04:46:24 search part "To define default values for the different mixer channels, set the" 04:46:50 you could just write an /etc/rc.local to fix it 04:47:07 or hints, yeah, that makes sense 04:53:57 nmz: this is a man page correct? 04:54:32 yes 04:54:57 man sound 05:08:45 running sysctl hint.pcm.0.vol="0", i get "sysctl: unknown oid 'hint.pcm.0.vol'" i believe i inputted the correct oid 05:10:56 I think that's only for /boot/loader.conf 05:12:11 man device.hints 05:27:06 ah thanks for clarifying 05:29:47 do you mean /boot/device.hints? 05:29:57 oh 05:29:58 i see 05:39:20 sorry, never had to use device hints before 06:16:50 gh00p: did you check for any nullfs mounts 07:29:02 where do user configuration files go on freebsd? on linux directories would be either in $HOME or $XDG_CONFIG_DIR, should i do the same on freebsd or should i put config files in /usr/local/etc? 07:46:31 unrealapex: normally user directories reside in /usr/home 08:33:05 unrealapex: You can just configure it to wherever you want under $HOME/.config/user-dirs.dirs. 08:33:56 But in principle, both $HOME or ~/.config should work on every Unix-like system. 11:38:23 mane: not any longer since 14.0-RELEASE, they are now in /home 11:38:37 i see 11:38:47 btw i've just gimped this :-D https://wskyx.github.io/2024/08/21/abstract211b.html 13:24:58 I am struggling to get FreeBSD connecting to wifi, my phone can but my laptop cant unless I am closer to the AP... could just be a weaker antenna or the fact there is 10+ wifi networks in my area (everything is wifi enabled, tv's printers, all the neighbours routers etc) and this is on the 2.4GHz band because my laptop is IEEE 802.11n 13:25:07 anything I can do to try to improve connectivity? 13:49:54 polarian: FreeBSD has barely working support for 5GHz and as for now, speeds limited to 80211n. Make sure your WiFi card is supported (mine in 3-years-old ThinkPad only started working on 15-CURRENT some 3 months ago) and don't expect speeds higher than what you get on 2.4GHz. 14:37:50 regis: it worked flawlessly until last night/today 14:37:59 also there is nothing wrong with 2.4GHz imo 14:38:24 in fact its much more stable than 5GHz which travels much shorter distances, not to mention 6GHz which almost requires a AP in every room as it can't go far... 14:41:11 imo wireless is just for connection on the go... 802.11n is fine for this... if you want high speed stick a ethernet cable in :P 14:42:51 wires FTW 14:43:00 indeed. 14:43:23 what do greybeard sysadmins and leet gamers have in common? no wireless! 14:47:03 I want TP for my network 14:49:36 i'm getting beavis flashbacks 14:50:51 :) 14:51:33 s/want/need/ then :D 14:51:51 Not a greybeard (simply because I can't grow one without getting a sex change perhaps), but I do have all my 10+ laptops on ethernet. No WiFi, unless I take them to some place else. 14:52:35 You're a greybeard in spirit, remiliascarlet 14:53:41 I do play games though, but on a desktop, since all my laptops run a BSD OS. 14:54:01 1 is Free, 1 is Net, and all the others are Open. 14:54:32 I don't run Dragonfly, simply because I can't manage to successfully install it on real hardware for whatever reason. 15:06:12 what happens if you try to bind on ::ffff:0:0 15:08:24 remiliascarlet: i may have the right hormones but a beard looks hideous on me. lets both be honorary beardless greybeads. 15:09:19 i'd like to hereby announce the new FreeBSD Greybeards club, beard not required for membership. Only a disdain for stupid technology and a good "get off my lawn" attitude. 15:09:22 Soni: The whole universe would get sucked into a blackhole. 15:13:20 we don't wanna fire up the freebsd vm right now 15:25:36 polarian: 2.4GHz is extremely polluted in residential areas, and in my case less stable than 5GHz due to noise from neighbors' devices. I'm really, really happy that my ThinkPad's AX200 card started working recently (the model was supported for a long time, since 14-CURRENT I think, but my specific device wasn't covered). I don't care about speeds that much as stability and I only got it with 5GHz living 15:25:42 in an appartment complex. 15:30:25 apartment complexes are the worst for wireless pollution... I am in semi-detached so I have a couple of neighbours 15:30:35 but 5GHz band is saturated too now, most devices are dual band 15:30:59 the solution is a wifi ap in each room :P 15:31:06 or higher gain antenna :P 15:44:12 is there a non-proxy solution that can route incoming packets through a private VPN/tunnel and come out the other end with their original IP addresses ? 15:46:40 last1: why would you want to preserve the IP address 16:00:07 polarian: for logging purposes 16:00:16 polarian: 5GHz has generally way shorter range than 2.4GHz and is less resistant to objects/walls etc. And it's great because your neighbors' f'in printer or fridge announcing their BSSID for whatever reasons, or "gaming WiFi routers" with "misconfigured" signal strength above regionally allowed and occupying multiple channels, are much less noisy even in adjacent appartments in an appartment complex. I 16:00:22 don't work with WiFi for 19-20 years profesionally, and my modern knowledge of 802.11 comes from consumer / low-end-enterprise devices that "just work". But my consumer opinion is that 5GHz is more reliable due to less noise, given proper coverage and strong signal. 16:01:10 regis: but that also makes it unrealistic to use 5GHz in your own home... as you need APs everywhere 16:01:40 for a small house we need 3 AP mesh in order to reliably get 5GHz coverage... and even then due to congestion in the area it sometimes struggles to get a few mbps 16:02:00 polarian: I have a rather small apartment and one Ubiqiti device covers it well. 16:02:36 what? you now need more goods and services to get the same value? but that's marvellous! -- monopoly top hat capitalist dude 16:02:36 I think it's 47m² 16:29:22 last1: makes me think of a site to site vpn, where you have routers on each end. natting twice. nat into the vpn, and nat back out. spreading a subnet over two locations. can get messy, right? you only want one dhcp server, but what if the two networks lose connection? 16:30:49 last1: IPv6? 17:05:08 polarian: You're mentioning a "house" and "congestion in the area". Are you sure that you see 5GHz congestion and not mixing it with 2.4? I usually see 20+ 2.4GHz networks, and just a few 5GHz ones. Currently, sitting at home when people got back from work already (7pm local time) I see 19 2.4GHz networks and single 5GHz one - mine. My experience is the same when travelling. 17:17:38 hmm, maybe I've been thinking this wrong 17:17:49 is there an optimization for FreeBSD to deal with higher latencies 17:18:12 for example, if I want to transfer data quickly from a a server that's 200ms away vs one that's 15ms away 17:18:27 is there any setting that's likely to have a meaningful impact over the transfer speed ? 17:20:56 Do you want faster transfers or a lower latency? Theres no magic switch afaik but maybe use udp instead of tcp? 17:21:22 is there a way to change font for tty in freebsd? 17:22:09 I can't get lower latency, it's physical distance 17:22:15 I need to optimize around it 17:23:17 There are a series of patches to ssh to increase buffer windows and other things to improve performance on high latency networks. You could look for them and try them out. 17:23:39 i use mosh over high latency connections and its pretty great 17:23:44 The maintainer of those discusses them periodically on the openssh-devel mailing list. 17:24:07 +1 for mosh on high latency links for interactive use 17:24:27 freebsd used actual text mode so I guess it's not possible to change font in tty 17:24:35 s/used/uses 17:24:45 It's not a streaming data copy protocol though. For that on high latency links one needs more buffers in flight. And parallel connections. 17:24:59 schizophrenic: no i'm pretty sure it's possible 17:25:00 pretty sure you can change the font of the tty i just cant remember the command 17:25:02 schizophrenic, I assumed you meant on the vt console. No? 17:25:41 rwp: yeah, it's called vt here in freebsd 17:25:43 looks loke vidfont(1)? 17:25:45 I don't know but I would start with "man vt" and see if there is information there on it. 17:25:55 vidfont(1) 17:25:57 (i started with man -k font) 17:26:02 ah you beat me to it 17:26:09 :) 17:26:45 I had this hidpi screen and couldnt see anything on startup, used to have the whole command memorized 17:26:58 mannn. slackware used to have the greatest console fonts 17:27:16 My problem on the vt console is not the displayed font so much as the keymap. I have been customizing one for me but haven't got it where I want it yet. 17:27:20 getz lol yeah 17:27:20 the old openbsd font was really nice 17:27:21 wait I can't change font to Noto Sans 17:27:31 you need a bitmap font 17:27:33 it doesn't list it however I can see it in fc-list 17:27:44 bitmap font :o 17:27:47 so no emoji? 17:27:50 i think so, i might be mistaken 17:28:36 "The vtfontcvt utility reads source font files in either BDF or Unifont 17:28:36 HEX format and outputs a file in one of the available output formats." -- vtfontcvt(8) 17:29:56 wow I could convert ttf font into bitmap font 17:30:34 yeah i'm kinda sad that robust, modern text rendering takes so much code and work in excess of what vt/wscons/etc allow 17:31:08 course i'm not even trying to do right-to-left text, and if i can't see emojis in my terminal that's good if anything :) 17:31:24 emojis are overrated 17:31:29 just use bitmojis 17:31:34 \0/ 17:33:03 the wider i see that text rendering gap is, the worse a job i know a real CRT terminal would do, if i ever managed to get one 17:33:37 see if you can't get the gallant font it makes me happy whenever I open the tty 17:34:08 it looks very SPARCy 17:34:14 mmmmm 17:36:19 whoo. i've found five gallants now none of which sounds like the one you are talking about 17:38:24 hah! here's a font called Gallant whose glyphs are cross-stitch patterns 17:39:49 https://www.fonts101.com/fonts/view/Serif/18408/Galant has just one 'l' in its name, but it's at least a serif font 17:40:30 haha funny, I was trying to turn it into a ttf to use in emacs, got it working but didnt like the outcome :( 17:41:01 the X misc 12x24 font gives me 65% of the good sparc vibes 18:18:29 When I dock my laptop with 14.1 I get no external mouse and keyboard. I have a built-in dock in a Lenovo screen. Where shall I start to dig? 18:21:37 You ned to connect it twice. One cable USB-C (Tb-Video), another Ub-C or USB (USB functions) 18:23:46 maccampus: Really? An ordinary USB is enough for #2 one? Where can I read about the why's? 18:24:52 it's because the 2 are sepperated uinside the Lenovo screen 18:25:32 i have the same issue with my HP screen 18:25:56 Ok.. interesting. Will investigate further. Unexpected answer. :-) 18:26:10 or Maybe the HW Engineers at Apple are just smarter 18:26:40 and they can use one cable for all signals 18:26:59 The same with Linux.. 18:27:42 i don't think the OS matters 18:27:57 maybe the bios does 18:33:26 But my bare metal works excellent with winblows and linux. Not FreeBSD though. Disclaimer: I asked here before entering the rabbit hole. 18:40:01 weird, it seems xf86 was the one crashing my freebsd 18:40:09 giving me page faults 18:53:50 Hmm, would I do better with a "real" docking station? I don't really love the thought of two usb-cables to dock. 19:58:17 hi all 19:59:21 I am new to freebsd and am trying to understand the usecasses where freebsd or a bsd derivate would be preferred over linux for web applications 20:00:19 are there any places where freebsd is prefered over linux? 20:15:24 well afaik it is used in hughe lets say clusters in for streaming business, as revers proxy and/or cache 20:15:38 for example 20:17:34 As a desktop it mostly boils down to user prefs. For example I run both on different machines. 20:19:12 Running Linux is "easier" due to better support/popularity but above a certain skill level it does not matter anymore 20:22:26 I ran FreeBSD as my work computer for many years, but now we worship M$$$ so I had to switch to Ubuntu to satisfy Azure MDM enforcement (the alternative was Win11 :shivers:). 20:24:03 On my supported desktops it is very fast and lightweight; only something like Arch/Gentoo can compete but FreeBSD is actually easier to set up than those. 20:29:22 how is the learning curve switching to freebsd for a linux user? 20:29:38 does it use roughly the same cli tools? 20:30:10 i like freebsd because of native zfs support and jails 20:30:20 I am considering using freebsd for a select few use cases, say as reverse proxy and file host, since it natively supports zfs 20:30:35 The most noticeable change is that the official documentation is much more coherent. Avoid following random online guides. 20:31:43 The system management tools are quite different, but TBH redhat vs Arch for example is like that as well. 20:32:19 can I run docker containers that were made for linux on freebsd? 20:43:59 through a vm, sure. or things like this continue progressing https://github.com/samuelkarp/runj 20:44:23 well 20:45:04 seems freebsd uses jails 20:45:13 and avoids docker overall 20:46:17 does jails have similiar features to docker like creating isolated networks etc? 20:47:33 for web dev docker containers are kinda the standard, so what would replace docker in freebsd? 20:47:56 i havent looked in detail how jails in freebsd works 20:51:21 i see, so docker relies heavily on the linux kernel and namespaces and control groups and therefor cant easily be ported to bsd without a vm 20:56:58 it does not 20:57:01 everything is different 20:57:15 netflix uses freebsd, apparently its good for cache's and so on 20:58:37 the closest distro to freebsd is slackware/gentoo/void linux. 21:01:30 jkli: it is not so much avoiding docker, but that BSD jails do a similar thing (OS-level virtualisation) 21:02:15 the other difference would be that you can virtualise lots of differennt linux distributions, but there is only really one freeBSD 21:03:21 although you can run different userlands in jails, I guess that's fairly similar to different flavours of linux. 21:04:37 I guess in principle the docker tooling could be adapted so that it knows a thing or two about how to marshal jails. 21:05:47 https://lwn.net/SubscriberLink/985210/f3c3beb9ef9c550e/ why, just why 21:07:13 is freebsd dying that they wanna get rust folks on it? 21:13:23 nmz freebsd users are very old and few 21:13:27 so yeah, it is dying 21:15:18 there's no reason to be scared of rust. good abstractions 21:15:47 it seems to have unusual momentum behind it 21:22:40 hi, I asked in #freebsd-jails which seems more appropiate but there is not that many audience as in here. When configuring a new thick jail, what is the minimal IP configuration so you aassign a static IP in the same interface and network segment than the host? Thanks 21:26:50 to provide more details, I set up the ip4.addr value which is listed in jls, but when I access the jail ifconfig shows all interfaces from the server without IP 21:45:32 I you have freebsd and need to run docker for dev work, the easiest way is to virtualise Ubuntu server in behyve: https://forums.freebsd.org/threads/how-to-install-a-ubuntu-guest-in-bhyve.66767/ 21:46:35 ubuntu runs pretty well. I don't usually use a gui but it is available as well 22:00:17 just in case it helps someone else: interface and allow.raw_sockets was needed in jail.d .conf file 22:14:38 when using make in the ports collection 22:14:45 how do I regain the menu to select the parts to build 22:15:01 or better question, where is a list of make commands 22:17:20 list of make commands in in `man ports` 22:17:25 make config will show the menu 22:17:39 thank you!! 22:20:05 👍 22:32:23 I have syslogd listening on port 514 and I am logging to it from haproxy 22:32:48 I can see the traffic going to it, for example: 18:32:37.809772 IP asia-relay.53386 > asia-relay.syslog: SYSLOG mail.info, length: 99 22:32:56 that's from tcpdump 22:33:03 but I have nothing in /var/log/maillog 22:33:25 in /etc/syslogd.conf I have: mail.info /var/log/maillog 22:36:49 from the same machine? 22:38:11 yes 22:40:13 I can see them quite clearly with tcpdump, for example: E.......⊙.~<22>Aug 21 18:39:45 haproxy[1070]: Connect from 127.0.0.1:33839 to 127.0.0.1:81 22:40:23 but if I run syslogd with -d switch there's nothing 22:40:37 I run it like this: syslogd -d -a localhost -b localhost -C -f /etc/syslog.conf 23:03:14 why not let haproxy write to the log file 23:04:04 I got it figured out, I had two services listening on port 514 23:04:13 uh huh 23:04:17 haproxy doesn't like to write directly to file because of some chroot stuff 23:06:35 bah