Chapter 2. Dealing with Files and Filesystems
Introduction
Now that youâre a bit more comfortable with the Unix environment,
itâs time to tackle some commands. Itâs funny how some of the most
useful commands on a Unix system have gained themselves a reputation for
being user-unfriendly. Do find
,
grep
, sed
, tr
, or
mount
make you shudder? If not,
remember that you still have novice users who are intimidated byâand
therefore arenât gaining the full potential ofâthese commands.
This chapter also addresses some useful filesystem manipulations. Have you ever inadvertently blown away a portion of your directory structure? Would you like to manipulate /tmp or your swap partition? Do your Unix systems need to play nicely with Microsoft systems? Might you consider ghosting your BSD system? If so, this chapter is for you.
Find Things
Finding fles in Unix can be an exercise in frustration for a novice user. Hereâs how to soften the learning curve.
Remember the first time you installed a Unix system? Once you
successfully booted to a command prompt, I bet your first thought was,
âNow what?â or possibly, âOkay, where is everything?â Iâm also pretty
sure your first foray into man find
wasnât all that enlightening.
How can you as an administrator make it easier for your users to find things? First, introduce them to the built-in commands. Then, add a few tricks of your own to soften the learning curve.
Finding Program Paths
Every user should become aware of the three
Get BSD Hacks now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.