summaryrefslogtreecommitdiff
path: root/usr.bin/fortune
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2017-02-26 04:41:37 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2017-02-26 04:41:37 +0000
commit1909a1f4947d85e27564a3fa54d3df6f71a065dc (patch)
tree7d8fe6a44eabfb5f8a2d088de11fb905d94926b0 /usr.bin/fortune
parentc7a9c7f6273656632f11404bb7585a4d7d6cd367 (diff)
downloadsrc-test-1909a1f4947d85e27564a3fa54d3df6f71a065dc.tar.gz
src-test-1909a1f4947d85e27564a3fa54d3df6f71a065dc.zip
More FreeBSD tips for fortune(6)
Submitted by: lme PR: 192373
Notes
Notes: svn path=/head/; revision=314288
Diffstat (limited to 'usr.bin/fortune')
-rw-r--r--usr.bin/fortune/datfiles/freebsd-tips136
1 files changed, 120 insertions, 16 deletions
diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips
index 97675860d1754..114b9304ec8ee 100644
--- a/usr.bin/fortune/datfiles/freebsd-tips
+++ b/usr.bin/fortune/datfiles/freebsd-tips
@@ -7,6 +7,7 @@ a root login. You can add a user to the wheel group by editing /etc/group.
%
By pressing "Scroll Lock" you can use the arrow keys to scroll backward
through the console output. Press "Scroll Lock" again to turn it off.
+Don't have a "Scroll Lock" key? The "Pause / Break" key acts alike.
%
Can't remember if you've installed a certain port or not? Try "pkg info
-x port_name".
@@ -40,8 +41,8 @@ Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
%
If other operating systems have damaged your Master Boot Record, you can
-reinstall it with boot0cfg(8). See
-"man boot0cfg" for details.
+reinstall it with gpart(8). See
+"man gpart" for details.
%
If you accidentally end up inside vi, you can quit it by pressing Escape, colon
(:), q (q), bang (!) and pressing return.
@@ -116,7 +117,7 @@ In order to support national characters for European languages in tools like
less without creating other nationalisation aspects, set the environment
variable LC_ALL to 'en_US.ISO8859-1'.
%
-"man firewall" will give advice for building a FreeBSD firewall
+"man firewall" will give advice for building a FreeBSD firewall using ipfw(8).
-- David Scheidt <dscheidt@tumbolia.com>
%
"man hier" will explain the way FreeBSD filesystems are normally laid out.
@@ -141,7 +142,8 @@ FreeBSD system.
-- David Scheidt <dscheidt@tumbolia.com>
%
Need to do a search in a manpage or in a file you've sent to a pager? Use
-"/search_word". To repeat the same search, type "n" for next.
+"/search_word". To repeat the same search, type "n" for next or "p" for
+previous.
-- Dru <genesis@istar.ca>
%
Need to find the location of a program? Use "locate program_name".
@@ -183,7 +185,7 @@ flag is your gateway.
Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ '
-- Mathieu <mathieu@hal.interactionvirtuelle.com>
%
-Over quota? "du -s * | sort -n " will give you a sorted list of your
+Over quota? "du -sh * | sort -h " will give you a sorted list of your
directory sizes.
-- David Scheidt <dscheidt@tumbolia.com>
%
@@ -191,7 +193,8 @@ nc(1) (or netcat) is useful not only for redirecting input/output to
TCP or UDP connections, but also for proxying them with inetd(8).
%
sh (the default Bourne shell in FreeBSD) supports command-line editing. Just
-``set -o emacs'' or ``set -o vi'' to enable it.
+``set -o emacs'' or ``set -o vi'' to enable it. Use "<TAB>" key to complete
+paths.
%
Simple tcsh prompt: set prompt = '%# '
%
@@ -215,6 +218,8 @@ the scroll lock key and use your page up button. When you're finished,
press the scroll lock key again to get your prompt back.
-- Dru <genesis@istar.ca>
%
+You can press Ctrl-L while in the shell to clear the screen.
+%
To determine whether a file is a text file, executable, or some other type
of file, use
@@ -231,10 +236,10 @@ is running FreeBSD at the time) to quickly find files based on name only.
To erase a line you've written at the command prompt, use "Ctrl-U".
-- Dru <genesis@istar.ca>
%
-To find the hostname associated with an IP address, use
+To find out the hostname associated with an IP address, use
drill -x IP_address
- -- Allan Jude <allanjude@FreeBSD.org>
+ -- Dru <genesis@istar.ca>
%
To obtain a neat PostScript rendering of a manual page, use ``-t'' switch
of the man(1) utility: ``man -t <topic>''. For example:
@@ -247,7 +252,8 @@ To quickly create an empty file, use "touch filename".
-- Dru <genesis@istar.ca>
%
To read a compressed file without having to first uncompress it, use
-"zcat" or "zless" to view it.
+"zcat" or "zless" to view it. There is also "bzcat", "bzless", "xzcat"
+and "xzless".
-- Dru <genesis@istar.ca>
%
To repeat the last command in the C shell, type "!!".
@@ -283,7 +289,7 @@ To see how much disk space is left on your partitions, use
%
To see the 10 largest files on a directory or partition, use
- du /partition_or_directory_name | sort -rn | head
+ du -h /partition_or_directory_name | sort -rh | head
-- Dru <genesis@istar.ca>
%
To see the IP addresses currently set on your active interfaces, type
@@ -291,7 +297,8 @@ To see the IP addresses currently set on your active interfaces, type
-- Dru <genesis@istar.ca>
%
To see the last 10 lines of a long file, use "tail filename". To see the
-first 10 lines, use "head filename".
+first 10 lines, use "head filename". To see new lines as they're appended
+to a file, use "tail -f filename".
-- Dru <genesis@istar.ca>
%
To see the last time that you logged in, use lastlogin(8).
@@ -343,6 +350,9 @@ write
This won't work if you don't have write permissions to the directory
and probably won't be suitable if you're editing through a symbolic link.
+
+If you have sudo(8) installed and permissions to use it, type
+``<ESC>w ! sudo tee %'' to force a write.
%
You can adjust the volume of various parts of the sound system in your
computer by typing 'mixer <type> <volume>'. To get a list of what you can
@@ -393,7 +403,7 @@ You can make a log of your terminal session with script(1).
You can often get answers to your questions about FreeBSD by searching in the
FreeBSD mailing list archives at
- http://www.FreeBSD.org/search/search.html
+ http://freebsd.markmail.org
%
You can open up a new split-screen window in (n)vi with :N or :E and then
use ^w to switch between the two.
@@ -408,8 +418,6 @@ You can press Ctrl-D to quickly exit from a shell, or logout from a
login shell.
-- Konstantinos Konstantinidis <kkonstan@duth.gr>
%
-You can press Ctrl-L while in the shell to clear the screen.
-%
You can press up-arrow or down-arrow to walk through a list of
previous commands in tcsh.
%
@@ -439,7 +447,9 @@ aliases, you can usually type just 'alias'.
%
You can use /etc/make.conf to control the options used to compile software
on this system. Example entries are in
-/usr/share/examples/etc/make.conf.
+/usr/share/examples/etc/make.conf and in make.conf(5).
+For options that are set for building FreeBSD's kernel and its world, see
+src.conf(5).
%
You can use "pkg info" to see a list of packages you have installed.
%
@@ -457,8 +467,102 @@ Try "whereis firefox" and "whereis whereis".
-- Konstantinos Konstantinidis <kkonstan@duth.gr>
%
Want to run the same command again?
-In tcsh you can type "!!"
+In tcsh you can type "!!".
%
Want to go the directory you were just in?
Type "cd -"
%
+Can't delete /usr/obj? Enter "chflags -R noschg /usr/obj" to remove the
+system immutable flag for all files in /usr/obj.
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+Want to list all files of an installed package? Enter
+"pkg info -l packagename".
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+Are you looking for a package? Search for it with
+"pkg search part_of_package_name"
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+If you want to recursively copy a directory preserving file and directory
+attributes use
+"cp -a source target"
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+Do you wonder what a terminal program is doing at the moment? dd(1) does not
+show any troughput? Hit "^T" (Control + t) to send SIGINFO to the process
+and see what it is doing.
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+Do you want to know which version of FreeBSD you are running? Enter
+"freebsd-version -ku" to display kernel and userland version.
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+If you want to end one or more processes at a time using a regular expression
+enter "pkill regex".
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+Do you want to run a program directly after some other process has ended? Use
+"pwait pid && new_program"
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+When you want your users to be able to reboot or shutdown FreeBSD, add them
+to the group "operator" and they are allowed to use shutdown(8) and poweroff(8).
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+If you need to create a FAT32 formatted USB thumb drive, find out its devicename
+running dmesg(8) after inserting it. Then create an MBR schema, a single slice and
+format it:
+
+# gpart create -s MBR ${devicename}
+# gpart add -t fat32 ${devicename}
+# newfs_msdos -F 32 -L thumbdrive ${devicename}s1
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+If you want to get a sorted list of all services that are started when FreeBSD boots,
+enter "service -e".
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+To easily configure your installed FreeBSD use bsdconfig(8).
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+After you compiled and installed a new version of FreeBSD, use etcupdate(8) to merge
+configuration updates.
+Run "etcupdate extract" once when your sources match your running system, then run
+"etcupdate" after every upgrade and "etcupdate resolve" to resolve any conflicts.
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+Do you want to do a binary upgrade of your running FreeBSD installation? Use freebsd-update(8).
+
+To install updates and patches for the running branch use
+# freebsd-update fetch install
+
+To upgrade to a newer release use
+# freebsd-update upgrade -r ${name_of_release}
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+To run rc scripts in /etc/rc.d and /usr/local/etc/rc.d use service(8).
+Run "service ${name_of_rc_script} start" to start a daemon and
+"service ${name_of_rc_script} stop" to stop it.
+
+ -- Lars Engels <lme@FreeBSD.org>
+%
+If you don't want to edit /etc/rc.conf directly, use sysrc(8) to add and remove entries.
+Use "sysrc name=value" to add an entry and "sysrc -x name" to delete an entry.
+
+ -- Lars Engels <lme@FreeBSD.org>
+%