As of May 31, 2023, we have updated our Code of Conduct.

Hot answers tagged

190 votes

FreeBSD: Directory called ^C (really!) - how to remove?

^V (ctrl+v) works as a kind of escape sequence for the next key-press, inserting the associated value instead of taking whatever action that would normally be associated. Making use of this, ^V^C (...
Håkan Lindqvist's user avatar
90 votes

FreeBSD: Directory called ^C (really!) - how to remove?

You may also remove the file by inode: $ ls -i1 290742 foo 293246 ^C $ find . -inum 293246 -delete Whatever you do, for God's sake, do not put -delete before -inum: $ touch foo bar baz quux $ find ....
bishop's user avatar
  • 1,076
35 votes

Delete 10M+ files from ZFS, effectively

Deletes in ZFS are expensive. Even more so if you have deduplication enabled on the filesystem (since dereferencing deduped files is expensive). Snapshots could complicate matters too. You may be ...
ewwhite's user avatar
  • 197k
32 votes

FreeBSD: Directory called ^C (really!) - how to remove?

Another option is to use rm -ri ./*; rm will ask you before deleting any file and directory, so you just need to reply y to the "bad" file, and n to all the others. Actually, in your case you can ...
Matteo Italia's user avatar
31 votes

FreeBSD Jails or Docker instances

I will address some of the aspects of FreeBSD jails and Linux Docker, of how they are similar and how they are different. both serve the same goal: it's an implementation of lightweight ...
drookie's user avatar
  • 8,588
29 votes

Delete 10M+ files from ZFS, effectively

How is it possible that resilvering the whole array takes an hour, but deleting from the disk takes 4 days? Consider an office building. Removing all of the computers and furniture and fixings ...
Phill  W.'s user avatar
  • 1,469
27 votes

How bad is it to have multiple devices with the same SSH server keys?

Rather than storing host-specific data such as ssh host keys on the SD card or other read-only media, you can store this in NVRAM, which is what it's for on an embedded system. You'll need to do some ...
Michael Hampton's user avatar
23 votes

FreeBSD: Directory called ^C (really!) - how to remove?

One option is to look up the file name with something other than ls. If you know it was produced by a verbatim Ctrl+C, you can find the ASCII character produced using a table of control characters, or ...
Jakob's user avatar
  • 331
22 votes

Bare metal or virtualize?

No question, virtualize. The benefits and flexibility afforded by virtualization far outweigh the negligible performance hit. Your plan, though is sub-optimal, primarily because Virtualbox is a ...
EEAA's user avatar
  • 109k
17 votes

How to install python3.4-pip in FreeBSD 10.1?

With Python 3.4 and later, you can use the ensurepip module to install pip on FreeBSD and elsewhere. python3.4 -m ensurepip should install pip as pip3.4.
alanc10n's user avatar
  • 303
16 votes

How do I disable hard disk spin down or head parking in FreeBSD?

On FreeBSD 12, camcontrol is used to control HDD power management, including spinning down and hard parking. Previously, ataidle or atacontrol was used, but their functionalities have already been ...
比尔盖子's user avatar
15 votes

linux : netstat listening queue length

Let's look into source code, as it's the best documentation in the world of open source. net/ipv4/tcp_diag.c: if (sk->sk_state == TCP_LISTEN) { r->idiag_rqueue = sk->sk_ack_backlog; ...
Alexander's user avatar
  • 426
15 votes

ZFS import unable to find any pools

for future reference, simply doing zpool import -a (will search for all), usually helps as well when a zpool/zfs fs isn't recognised.
Mal's user avatar
  • 151
15 votes

Should I create ZFS zpools with whole disks or partitions?

Use one slice/partition dedicated for ZFS per physical disc and leave some space unpartitioned. That way if you ever need to replace a drive and the replacement is 10 sectors smaller, you'll still be ...
Grogi's user avatar
  • 299
15 votes

FreeBSD: Directory called ^C (really!) - how to remove?

Often in this kind of situations it is easy to come up with a wildcard pattern that matches the relevant file. In your case, this would be simply ? (matching all file names with precisely one ...
Jukka Suomela's user avatar
14 votes

Backing up a MySQL database via ZFS snapshots

You need a full database lock to backup a (most) database(s) consistently. The manual says FLUSH TABLES WITH READ LOCK is correct for ZFS ...
Ryan Babchishin's user avatar
13 votes

BSD nc (netcat) does not terminate on EOF

I, too, was puzzled by netcat's behavior, so I dug into the code. Here's the whole story: nc servers (nc -l) and clients only exit after the mutual connection was closed. That is, if each of the ...
ens's user avatar
  • 245
12 votes

How bad is it to have multiple devices with the same SSH server keys?

The impact of shipping the same key pair with all your devices is directly related to the security of the clients connecting to them, as it means that there is no way (from an SSH client) to uniquely ...
dawud's user avatar
  • 15.1k
12 votes

nginx php-fpm child exited with code 0

First, this is the expected behavior. The messages are marked as NOTICE, the default in php-fpm.conf: ; Log level ; Possible Values: alert, error, warning, notice, debug ; Default Value: notice ;...
Paulo Coghi's user avatar
11 votes

FreeBSD: Directory called ^C (really!) - how to remove?

You can use Midnight Commander (mc) to delete the file - just select with up/down buttons and press F8. I did that occasionally when file names had strange characters due to encoding.
filo's user avatar
  • 411
11 votes

Offline uncorrectable sectors in SSDs being used for ZFS L2ARC?

Those numbers are obviously bogus. Your SSD doesn't have that many sectors at all, let alone offline uncorrectable ones. Check for firmware updates for your SSD that will fix the problem. Otherwise, ...
Michael Hampton's user avatar
10 votes

How to check if RAM is running in ECC mode?

Today I found out that there is a commercial version of memtest86 (without the +) from PassMark that offers a free version too which thankfully included ECC-Checks. In addition it also supports DDR4 ...
comfreak's user avatar
  • 1,491
9 votes

How do I non-interactively update FreeBSD system (and ports)?

On FreeBSD-10.2 there's a new option to allow this: freebsd-update fetch --not-running-from-cron From the manpage: --not-running-from-cron Force freebsd-update fetch to proceed when there is ...
ZoFreX's user avatar
  • 308
8 votes

Delete 10M+ files from ZFS, effectively

Ian Howson gives a good answer on why it is slow. If you delete files in parallel you may see an increase in speed due to the deletion may use the same blocks and thus can save rewriting the same ...
Ole Tange's user avatar
  • 2,906
8 votes

Backing up a MySQL database via ZFS snapshots

I've ripped off and adapted a conceptually simple script in Bash which I found in another Server Fault post by Tobia. It should get you about 90% of the way there. mysql_locked=/var/run/mysql_locked ...
Michael Hampton's user avatar
8 votes

FreeBSD rc.d script doesn't start as a daemon

The RC script itself is not intended to daemonize, but is expected to start and stop the daemon. If your service does not have an option to start as a daemon, you can use daemon(8) to manage that ...
Richard Smith's user avatar
8 votes

Install Java 9, 10, 11, or 12 on FreeBSD 11.1

Java 11 & 12 OpenJDK 11 and 12 can now be found in the Ports tree. See: java/openjdk11 java/openjdk12 An effort is underway to see future versions of OpenJDK for FreeBSD regularly made ...
arrowd's user avatar
  • 319
8 votes

How to move iocage jails from one ZFS pool to another?

To move iocage from /mnt/OLD/iocage to /mnt/NEW/iocage: Export jails iocage stop JAILNAME iocage export JAILNAME This creates a dated .zip of the jail in /mnt/OLD/iocage/images. Set up new pool Use ...
Adam's user avatar
  • 595
7 votes

Installing multiple php versions plus extensions on freebsd

The variable noone talked about is called PHPBASE: It allows working with multiple PHP installs on a FreeBSD server, placing each in it's own directory. It's then used in make.conf to point specific ...
Florian Heigl's user avatar
7 votes

Delete 10M+ files from ZFS, effectively

There's a number of things going on here. First, all modern disk technologies are optimised for bulk transfers. If you need to move 100MB of data, they'll do it much faster if they're in one ...
Ian Howson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible