Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [bsd]

Berkeley Software Distribution is a Unix operating system

2
votes
3answers
42 views

wc -l to count lines all txt files in folders and subfolders

I have a few hundred txt files in several subfolders and I would like the count the lines in each txt file. I can do this for all txt files in the current directory by using: for f in *.txt; do wc -l ...
0
votes
2answers
32 views

Forgot correct syntax to mv millions of files around on the same partition

I had a command line instruction to move a 100k’s of jpgs to the correct directory on the same disk/volume/partition and without using xargs. The quirk is that the jpgs have spaces and multiple ...
0
votes
0answers
29 views

How does route-to work in the BSD pf firewall?

I've recently learned about the route-to functionality in the pf firewall, and I wonder how it works. Is it similar to the "policy-based routing" system in linux? How does route-to allow the ...
0
votes
1answer
58 views

how to make my sed command work in GNU works in BSD

I have a block content in my ~/.ssh/config. begin with a line '# BEGIN AUTO GENERATED CONTENT' and end with a line '# END AUTO GENERATED CONTENT' I have a command replacing content between this two ...
0
votes
1answer
53 views

Translating Linux stat(1) command into BSD stat(1) command

Background CLion's remote project feature currently doesn't support FreeBSD as a remote host OS, but I want to do some hacking and see if it works. By reading the log file, I think I have spotted (...
7
votes
1answer
228 views

Newlines in BSD sed vs gsed

The sed, which comes with FreeBSD 11.2 p7, gives: $ seq 10 | sed 'N; l; D; p' 1$ 2$ 2$ 3$ 3$ 4$ 4$ 5$ 5$ 6$ 6$ 7$ 7$ 8$ 8$ 9$ 9$ 10$ While gsed (GNU sed 4.7) gives for the same script: $ seq 10 | ...
0
votes
2answers
90 views

Are there multiple flavors of the GNU tools?

I think that the BSD tools have different flavors, for example the BSD ls tool is not the same tool on FreeBSD and OpenBSD and NetBSD (and even on macOS). Note that by "different flavors" I mean that ...
1
vote
0answers
34 views

Are BSD systems evidently more fault tolerant than other family of operating systems? [closed]

I remember reading somewhere, that BSD systems are more fault tolerant than other Unix and Unix-like system families such as System III/V and Linux, but I checked all online FreeBSD books and searched ...
1
vote
1answer
94 views

Does Apple modify the GNU and BSD tools that comes with macOS? [duplicate]

macOS comes with bash (which is a GNU tool), macOS also comes with tools like ls and chmod (which are BSD tools, even though I don't know from which BSD flavor they come from). Now does the GNU and ...
26
votes
5answers
3k views

Do the common programs (for example: “ls”, “cat”) in Linux and BSD come from the same source code? [duplicate]

Both Linux and BSD have common programs like ls and cat and echo and kill. Do they come from the same source code, or do both and Linux and BSD own their own unique source code for these programs?
0
votes
1answer
67 views

blacklistd not blocking addresses

I've enabled the PF(4) firewall and blacklistd(8). Although IP addresses are being added to to blacklist, I can still see multiple failed attempts from a single IP address. Yet when I test it myself, ...
0
votes
1answer
64 views

how to use logger to write info to log

I want to use the logger command in order to write logs to /var/log/server.log NOTE: These examples use the FreeBSD version of logger. Your system may have different options, so read your local ...
0
votes
1answer
72 views

Does BSD have priveleges or capabilities?

In Solaris, I believe that you can assign privileges to users, and in Linux you can assign capabilities to executable files. Does some or all BSD flavors have privileges or capabilities, or something ...
1
vote
1answer
27 views

rc scripts for multiple Zope instances in FreeBSD

I'm trying to configure multiple Zope-Instances as daemons in FreeBSD. Each instance gets a start script in /usr/local/etc/rc.d. Starting works fine, but invoking status or stop is problematic because ...
0
votes
1answer
67 views

How to install man pages for certain libc functions?

In the past, from time to time, while developing Linux software, I have noticed that some man pages which deal with developer documentation are missing on my systems. This happens mainly on Debian ...
2
votes
0answers
42 views

Enabling dual boot in grub: debian and graphical *BSD

After installing TrueOS to unallocated disk space, my computer didn't boot properly any more. With choosing a boot image, my screen froze. So I ran the rescue mode of a debian install medium and ...
-1
votes
1answer
43 views

How many packages can one pc contain (without conflicts)? [closed]

I'm talking about one architecture, one distribution "at a time" (no multi-boot) and only packages in official repositories. If repos from different distros can be mixed, I'd like to distinguish ...
1
vote
1answer
51 views

What's the content of license that AT&T licensed Unix to third-party vendors?

Initially intended for use inside the Bell System, AT&T licensed Unix to outside parties in the late 1970s, leading to a variety of both academic and commercial Unix variants from vendors ...
0
votes
0answers
101 views

Does anyone remember “wow”?

Is there anyone out there who remembers the "wow" command? This is my recollection: Back in the days- oh, probably around or before BSD 4.3 (circa 1984-88 or so)- you could type in "wow" at the ...
2
votes
0answers
36 views

No such process (3) when not connected to a network (AF_ROUTE)

When I am connected to a network, I can send a struct rt_msghdr* to the kernel and receive a corresponding route. However, when I disconnect from the network and try to send the same route message ...
0
votes
0answers
37 views

Multibooting with LVM

Can Linux and/or Unix operating systems be booted from logical volumes inside of an LVM partition? Can they reside together in the same volume group, i.e., multiple Linux and BSD distros, each in ...
1
vote
1answer
53 views

On FreeBSD, or other BSDs, what directory is commonly used for data folder storing the content of a database such as Postgres

I am wondering if there is a convention on where to store the data folder containing all the files for the tables and rows of a relational database system such as Postgres.
0
votes
1answer
185 views

Differences between forwarding and redirect in net.inet.ip

What are the differences between sysctl variables net.inet.ip.forwarding and net.inet.ip.redirect?
1
vote
2answers
92 views

Sort the files by size retrieved from a series of folders

I retrieved all the pdfs in $HOME directory $ find -E ~ -regex ".*/[^/].*.pdf" It print more than 1000 files; I intent to sort them by size and searched $ stat -f '%z' draft.sh 184 I drafts the ...
0
votes
1answer
39 views

FreeBSD Ethernet Port Bonding

After reading about FreeBSD aggregation we think we are set but it's still not clear to me. Switch is a Cisco 2960S (software 15.x), Client is a Mac Pro running Mavericks. I don't know if the BSD ...
0
votes
1answer
79 views

how convert linux sed command to bsd [duplicate]

How can I make this work on macOS terminal? sed -i 's/config.action_mailer.default_url_options =.*$/config.action_mailer.default_url_options = {:host => "localhost:3000"}/g' config/environments/...
12
votes
1answer
4k views

What are the relations between processes, kernel threads, lightweight processes and user threads in Unix? [closed]

Unix Internal by Vahalia have figures showing the relations between processes, kernel threads, lightweight processes, and user threads. This book gives most attention to SVR4.2, and it also explores ...
0
votes
1answer
88 views

Are there any Keryx offline repository manager alternatives for NetBSD?

I want to install Xfce offline on another computer but I don't know. I searched in internet and found Keryx offline repository manager for Debian-based package management but not NetBSD. I want to ...
1
vote
1answer
222 views

How to change the font size in NetBSD (TTY no GUI)

NetBSD 7.1 (GENERIC.201703111743Z) amd64 In TTY without gui , the better screen resolution is set at boot time but the font is really to small. So how to change that On debian dpkg-reconfigure ...
4
votes
2answers
93 views

BSD sed vs GNU - is it capable of nested matches?

This works perfectly well on any Linux : $ echo foo bar | sed -n '/foo/{/bar/{;p;}}' foo bar But fails on OSXs ancient BSD variant : ❯ echo foo bar | sed -n '/foo/{/bar/{;p;}}' sed: 1: "/foo/{/...
0
votes
1answer
44 views

Move/transform everything from pwd into subdirectory while archiving with tar

I am on a MacOS machine (I think tar command is BSD). From I have read the -s switch on BSD tar, is the same thing as the --transform switch for GNU tar. I have this command: tar -zcf foo.tgz -s /^"$...
-3
votes
1answer
119 views

Are there any resources for learn making BSD-like systems like NetBSD and OpenBSD? [closed]

Don't tell me learn LFS (Linux from scratch) and make your Linux distribution. I interested on BSD-like systems. I want to become like Theo de Raadt (founder and leader of the OpenBSD and NetBSD) and ...
2
votes
3answers
237 views

Why isn't there a /usr/include/GL directory on OpenBSD?

I have just recently made the switched for Linux to OpenBSD. So far, I am really liking the philosophy of including the bare minimum needed to run the system, and the emphasis for clean and simple ...
0
votes
2answers
127 views

equivalent command `route -n` in BSD

Command route -n of BSD return nothing $ route -n usage: route [-dnqtv] command [[modifiers] args] It's output of GNU version What's the equivalent in BSD?
1
vote
1answer
57 views

The BSD's stat option equivalent to `%y` in GNU

There's an option %y which state the last modification time %y time of last data modification, human-readable BSD's stat could list verbose information as $ stat -x Foo File: "Foo" ...
0
votes
2answers
81 views

A Sparse Format from command stat

I'd like to check the status my directories $ ls Foo Bar Zoo Check their status $ ls | xargs stat -x File: "Zoo" Size: 384 FileType: Directory Mode: (0755/...
14
votes
2answers
3k views

Are different Linux/Unix kernels interchangeable?

Can I take a Linux kernel and use it with, say, FreeBSD and vice versa (FreeBSD kernel in, say, a Debian)? Is there a universal answer? What are the limitations? What are the obstructions?
1
vote
1answer
2k views

Installed incompatible pkg version, how to uninstall (or fix otherwise)?

While trying to upgrade a pfSense 2.2.6 to the latest version (as described here) and running pkg, I got: The package management tool is not yet installed on your system. Do you want to fetch and ...
2
votes
1answer
161 views

Reverting OpenBSD Install In-Place

What I'm trying to do is revert my VPS running OpenBSD-current (following via binary updates, using snapshots and booting to ramdisk) to OpenBSD-6.2-release. It's not an important system, so if it ...
1
vote
0answers
21 views

BSD/macOS updatedb spec?

For linux, the format of mlocate's DB is documented here. Without diving into the source, is there a similar spec for BSD / macOS locate.database available?
1
vote
1answer
924 views

pkgin installation problem (NetBSD)

I just installed NetBSD 7.1.1 (i386) on my old laptop. During the installation, I could not install pgkin (I don't know why), so I skipped it and now I have a NetBSD 7.1.1 installed on my laptop ...
2
votes
1answer
269 views

I can not change the ciphers in OpenBSD 6.2 in httpd.conf

I can not change the ciphers in OpenBSD 6.2 in httpd.conf tls ciphers "HIGH:!aNULL:!eNULL:!SSLv3:!TLSv1:!DSS:!ECDSA:!RSA:!SHA1:!AES128:!DHE:-ECDH:ECDHE:+SHA384:+SHA256" /etc/httpd.conf:46: ...
1
vote
2answers
484 views

Add a path to /etc/paths.d/ referring to whatever logged in users home directory

I found this cool trick from Postgres.app website echo /Users/user1/latest/bin | sudo tee /etc/paths.d/postgresapp I want to know, how can I make this work for any logged in user. I want something ...
1
vote
0answers
40 views

macOS (BSD) vs GNU grep multiple pattern inconsistency [duplicate]

I am on macOS Sierra 10.12.6 $ grep --version grep (BSD grep) 2.5.1-FreeBSD $ ggrep --version ggrep (GNU grep) 3.1 Packaged by Homebrew Copyright (C) 2017 Free Software Foundation, Inc. License ...
6
votes
1answer
167 views

Is Linux the only operating system in the Unix-like/Unix category of operating systems that uses the “fsuid” and the “fsgid”?

Linux uses the file system user id (fsuid) instead of the effective user ID (euid), and the file system group ID (fsgid) instead of the effective group ID (egid) in permission checks. Is Linux the ...
1
vote
0answers
193 views

bootloader not showing GhostBSD

I have just Removed Windows and installed GhostBSD on its place. But whenever I power on my laptop I cant see GhostBSD boot option in bootloader. I am using default grub loader that I was using before ...
1
vote
1answer
144 views

bsdtar: How to avoid overwriting existing file info?

bsdtar has a -k (Do not overwrite existing files) option, which avoids changing the contents of any existing files, but it still overwrites the file info (e.g. permissions) with what is in the archive....
2
votes
0answers
455 views

With bsdtar “--exclude”, how to only exclude subdirectories?

In GNU tar (i.e. gtar), the --exclude option with a glob only matches the subdirectories, but not the directory itself. For example, --exclude test-tar/a/b/* would exclude anything inside of b, but ...
-1
votes
1answer
54 views

is there a Base64-based dist?

Is there a Linux distribution or Unix version where everything is Base64 encoded in memory? I'm interested in the concept of being able to dump the entire system state and print it as a book.
2
votes
1answer
45 views

How to make appends to files fail if the file does not exist already?

For example echo Something >> SomeFile I want this append to work only if SomeFile exists already. Right now I am using the following: if [ -e SomeFile ]; then echo Something >>...