e94a Interesting base system programs you may not know about... - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > General

General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

Reply
 
Thread Tools Display Modes
  #1  
Old December 3rd, 2012, 10:09
nickednamed nickednamed is offline
Junior Member
 
Join Date: Jan 2011
Posts: 82
Thanks: 30
Thanked 6 Times in 2 Posts
Default Interesting base system programs you may not know about...

A while ago FreeBSD forum user Beastie brought to my attention a great little program: math/units which is part of the base system.

So I was wondering if anybody knows of any other useful / interesting base-system gems which may have been overlooked? If you know one, post it here!
Reply With Quote
  #2  
Old December 3rd, 2012, 15:09
jrm's Avatar
jrm jrm is online now
Member
 
Join Date: Nov 2008
Location: Tralfamadore
Posts: 524
Thanks: 63
Thanked 121 Times in 91 Posts
Default

If you list the contents of /usr/bin/ you'll see similarly spirited utilities like bc, calendar, ncal.

One program in /usr/bin/ that I find helpful is tee. With it, you can do something like % prog | tee outfile and you get prog's output sent to standard output and outfile.
Reply With Quote
The Following User Says Thank You to jrm For This Useful Post:
nickednamed (December 4th, 2012)
  #3  
Old December 5th, 2012, 09:03
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,694
Thanks: 47
Thanked 2,020 Times in 1,859 Posts
Default

Netcat! Often overlooked

printf "GET / HTTP/1.0\r\n\r\n" | nc host.example.com 80

See nc(1) for more examples.

And I also like dc(1) instead of bc(1). Mainly because it uses RPN (I'm a big fan) and it can do hexadecimal conversions.

Code:
dice@molly:~$ dc
16i
C0
p
192
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
The Following User Says Thank You to SirDice For This Useful Post:
nickednamed (December 10th, 2012)
  #4  
Old December 5th, 2012, 18:09
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,701
Thanks: 429
Thanked 1,757 Times in 1,456 Posts
Default

fmt(1) has a nice little wordwrap function. And there's jot(1), which I can't recall using but certainly can do lots of weird things.

Unix Power Tools has a lot of classic command examples.
Reply With Quote
The Following User Says Thank You to wblock@ For This Useful Post:
nickednamed (December 10th, 2012)
  #5  
Old December 10th, 2012, 15:01
nickednamed nickednamed is offline
Junior Member
 
Join Date: Jan 2011
Posts: 82
Thanks: 30
Thanked 6 Times in 2 Posts
Default

Thanks guys.

Can't believe how much easier shell scripting will be after checking some of these out; it's like someone already thought of most of the things I want to do. It's a pity that the shell scripting books I have read [and largely forgotten!] had only, grep, cut, cat, echo, sed, and a few others I'm sure.

I have actually been going through usr/bin and reading randomly selected programs' man pages, but some of them are a bit esoteric, so it's always nice to see how real people actually use these programs for real life problems, especially in combination.
Reply With Quote
  #6  
Old December 10th, 2012, 17:25
fonz's Avatar
fonz fonz is online now
Moderator
 
Join Date: Nov 2008
Location: Apeldoorn, the Netherlands
Posts: 1,445
Thanks: 369
Thanked 231 Times in 205 Posts
Default

In my opinion there's only so much one can learn from a conventional UNIX book. Once you've read one and understand the basics, you're probably better served with Tips&Tricks kind of books (UNIX Power Tools, BSD Hacks, that sort of thing). Also, choosing random commands from /usr/(s)bin and reading up on what they do is a good way of learning, as you've already discovered. And don't forget the FreeBSD fortune(6) cookies.

Fonz
__________________
Ken sent me.
Reply With Quote
The Following User Says Thank You to fonz For This Useful Post:
nickednamed (December 14th, 2012)
Reply

Tags
base, port, program, units

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] Protecting the base system - a la PC-BSD nickednamed General 8 October 14th, 2012 18:11
Base System - World - Userland Niatross General 10 September 24th, 2012 16:27
Config version not up to date on base system. sossego Installing & Upgrading 1 February 26th, 2012 05:26
Crosscompile the base system minimike Installing & Upgrading 4 August 12th, 2011 09:21
Base system compile error sk8harddiefast Installing & Upgrading 1 September 27th, 2010 03:36


All times are GMT +1. The time now is 18:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0