Module Name: src
Committed By: nia
Date: Tue Oct 25 15:44:02 UTC 2022
Modified Files:
src/games/fortune/datfiles: netbsd-tips
Log Message:
various tips/simplifications from UnitedBSD
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/games/fortune/datfiles/netbsd-tips
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/fortune/datfiles/netbsd-tips
diff -u src/games/fortune/datfiles/netbsd-tips:1.14 src/games/fortune/datfiles/netbsd-tips:1.15
--- src/games/fortune/datfiles/netbsd-tips:1.14 Fri Nov 26 17:38:07 2021
+++ src/games/fortune/datfiles/netbsd-tips Tue Oct 25 15:44:02 2022
@@ -1,6 +1,6 @@
List 20 largest files (larger than 5 MB) sorted by megabytes:
- find / -type f -size +10000 -print0 | xargs -0 du -m | sort -nr | head -20
+ find . -type f -size +10000 -exec du -h {} + | sort -nr | head -20
%
You can keep specific rc.conf configurations in individual files
under /etc/rc.conf.d/ where each file is named after the $name of
@@ -211,3 +211,23 @@ To list connected disk devices:
screenblank(1) can disable the framebuffer if the keyboard and mouse are
idle for a period of time, and re-enables the framebuffer when keyboard
or mouse activity resumes.
+%
+If you want to convert a Microsoft Windows text file to have Unix line
+endings, it's possible to achieve by simply stripping all of the carriage
+return characters from the file:
+
+ tr -d '\r' < IN > OUT
+
+However, you might want to do this more carefully (i.e. only remove
+carriage returns that constitute a line ending). See "dos2unix" in pkgsrc.
+%
+Some useful X11 commands:
+
+ xset s off # disable screen blanking
+ xset -dpms # disable screen power saving
+ xset b 0 # mute bell (beep)
+ xset m 55/20 4 # mouse acceleration
+%
+Automatically run a make(1) job on each active CPU:
+
+ alias make="make -j $(sysctl -n hw.ncpuonline)"