Questions tagged [bsd]

BSD is a family of Unix-like operating systems, including FreeBSD, NetBSD and OpenBSD.

510 questions
21
votes
4 answers

How do I use a new-line replacement in a BSD sed?

Greetings, how do I perform the following in BSD sed? sed 's/ /\n/g' From the man-page it states that \n will be treated literally within a replacement string, how do I avoid this behavior? Is there an alternate? I'm using Mac OS Snow Leopard, I…
Brett Ryan
  • 26,937
  • 30
  • 128
  • 163
20
votes
12 answers

What's the best way to get to know linux or BSD kernel internals?

I'd like to gain better knowledge of operating system internals. Process management, memory management, and stuff like that. I was thinking of learning by getting to know either linux or BSD kernel. Which one kernel is better for learning…
Michał Piaskowski
  • 3,800
  • 2
  • 34
  • 46
20
votes
6 answers

Good collection of libraries for C?

I'm looking for a good collection of libraries for ANSI-C, stuff for handling vectors, hash maps, binary tress, string processing, etc.
thr
  • 19,160
  • 23
  • 93
  • 130
20
votes
2 answers

formatted modified date/time of file on mac bash?

In my bash script on mac (snow leopard) I have a path and filename, and I need to get the modified date/time of that file. I found I could do: stat -f "%m" $MYFILE However, that returns what I assume is epoch date/time. I need the date/time…
David Burson
  • 2,947
  • 7
  • 32
  • 55
17
votes
4 answers

How can I use rsync to backup files changed within a recent period?

Is it possible to specify a time range so that rsync only operates on recently changed files. I'm writing a script to backup recently added files over SSH and rsync seems like an efficient solution. My problem is that my source directories contain a…
Ken
  • 77,016
  • 30
  • 84
  • 101
14
votes
1 answer

How to run *BSD OS on Docker?

How to run *BSD (Open, Free, etc.) on Docker? I am using Docker for Mac. But There is no BSD image on Docker Hub. How I can run it?
KiYugadgeter
  • 3,796
  • 7
  • 34
  • 74
14
votes
1 answer

Risks and rewards of using /dev/autofs_nowait on OS X

Throughout the CoreFoundation framework source, POSIX filesystem API calls (e.g. open(), stat(), et al…) are wrapped in an idiom wherein a descriptor on /dev/autofs_nowait is acquired – with open(…, 0) – before the POSIX calls are made; afterwards…
fish2000
  • 4,289
  • 2
  • 37
  • 76
14
votes
2 answers

How to guarantee a specified file is a device on BSD/Linux from PHP?

While working on a project that reads from /dev/urandom to generate random bytes, it was suggested that I check to make sure that /dev/urandom is a device not just a file. The most straightforward way seems to be something like: /** * Is the given…
Scott Arciszewski
  • 33,610
  • 16
  • 89
  • 206
13
votes
8 answers

Kernel Scheduling for 1024 CPUs

Azul Systems has an appliance that supports thousands of cache coherent CPUs. I would love insight into what changes would need to occur to an operating system in order to schedule thousands of simultaneously running threads.
McGovernTheory
  • 6,556
  • 4
  • 41
  • 75
11
votes
5 answers

How would you build a database filesystem (DBFS)?

A database file system is a file system that is a database instead of a hierarchy. Not too complex an idea initially but I thought I'd ask if anyone has thought about how they might do something like this? What are the issues that a simple plan is…
Dave
  • 7,589
  • 12
  • 36
  • 42
10
votes
10 answers

Are there any small Unix or BSD distributions?

I was wondering if there are any small BSD or unix releases. The smallest Linux release I've seen that looked good is partedmagic (around 70MB). Free BSD needs like 4 CDs, maybe more.
Glas
  • 109
  • 1
  • 1
  • 3
10
votes
1 answer

How much memory locked in a process

Using getrlimit(RLIMIT_MEMLOCK), one can get the allowed amount of locked memory a process can allocate (mlock() or mlockall()). But how to retrieve the currently locked memory amount ? For example, there's no information returned by…
Yann Droneaud
  • 5,277
  • 1
  • 23
  • 39
10
votes
3 answers

What's the Solaris equivalent to the BSD's 'tail -n100'?

I've looked this up a thousand times, and I always forget it, so, here for eternity: Solaris has a bit of an awkward syntax for tail. How do I do the equivalent of BSD's tail -nN? What I want are the last N lines from tail's input.
kch
  • 77,385
  • 46
  • 136
  • 148
10
votes
5 answers

Using regex to tell csplit where to split the file

I have a large text file with content set up like this: --- title: Lorim Ipsum Dolar --- Lorim ipsum content --- title: Excelvier whatever --- Lorim ipsum content goes here. I'm trying to split up this file into individual files using…
Philip Meissner
  • 163
  • 1
  • 1
  • 10
9
votes
4 answers

'git grep' and word boundaries on Mac OS X and BSD

I run git grep "\" regularly on my linux development server, but I just discovered that I am not able to use \< and \> on Mac (Mac OS X 10.6.8) (not able to use = it does not find anything). Is the regular expressions syntax different in Mac?…
Yogeshwer Sharma
  • 3,647
  • 5
  • 25
  • 27
1
2
3
33 34