[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-users] Re: Help
From: |
Duncan |
Subject: |
[Pan-users] Re: Help |
Date: |
Mon, 5 Nov 2007 15:42:47 +0000 (UTC) |
User-agent: |
Pan/0.132 (Waxed in Black) |
"Bill Wright" <address@hidden> posted
address@hidden, excerpted below, on Mon, 05 Nov
2007 08:22:37 -0500:
> Having been a windows user for many years, I find it difficult
> navigating the linux file system. How do I get to and how do I find
> .pan2 file so that I can rename it?
First thing, keep in mind that an initial dot at the beginning of a
filename is the Unix/Linux way of marking a file "hidden", something the
FAT and NTFS filesystems MS uses had/have a file attribute to handle.
So you normally won't see any file starting with a dot. You can either
type it in at the command line if that's your thing, or (as on MSWormOS)
turn on viewing of hidden files in your filemanager, if you prefer that,
so you can see it and work with it that way.
Second thing, ~/ is a shortcut way of referencing a users home directory,
normally /home/<username> . Thus, ~/.pan2 indicates the (hidden) .pan2
file (or in this case directory) in your home directory.
So for example, if your user's name is "walt", then the directory would
normally be /home/walt/.pan2 . If you chose to do the move from the
command line, you could use commands such as this:
cd
mv .pan2 .pan2.backup
FWIW, cd=change directory. Without a directory to change to, it defaults
to changing to the user's home directory, /home/walt/ in our example.
mv=move. Note that since the commands above don't mention the home
directory by name, they should work no matter /what/ your username is, as
long as your commandline session is as the same user as you use when
running pan.
Three, off topic for pan, but worthwhile to mention while we are on the
topic of hidden files that start with a dot, as this is **VERY**
**IMPORTANT**: rm is the remove command. It has a commandline switch -r
which means recursive (remove all subdirectories as well) and of course,
* is a wildcard. NEVER EVER EVER (EVER EVER EVER!!!) type in a command
such as rm -r .*
If you take a look at the hidden .* files in several directories and
figure out what they reference, you'll see why the above is such a big no-
no. Similar to the MS filesystems you may be used to, directories
normally have two "default" entries in them, . (single dot, referring to
"me", the dir I'm in right now) and .. (double dot, referring to the
parent dir). rm -r .* will (or at least used to, I've read that it
refused now, but obviously I've not tested it) remove .., that is the
PARENT dir, recursively, including its parent dir, ALL THE WAY TO / ,
that is the root or top dir! IOW, running that command is a good way to
be left with an empty disk!
Running the command as a normal user is bad enough -- you usually lose
all the personal files you might have been saving. Running it as root...
well, you can lose your entire system.
A similar effect can be had with a minor typo, a space where it shouldn't
be, particularly with wildcards, can turn an ordinary rm of a couple of
stray files into an rm of rather more than intended. Suppose after
getting pan working, you want to remove the backup dir created above.
rm -r .pan2.backup, right? But now, if you are lazy and know the
only .pan2.* file or dir is .pan2.backup, you might type that instead.
Great, and it'll do what you wanted, but consider what happens if you get
a stray space before that *, and type this instead: rm -r .pan2 * !!!
The moral of this point is this: When deleting (rm-ing) anything,
particularly hidden files, OR when typing in ANY command as root, get in
the habit of typing in the command but NOT THE ENTER. Then sit on your
hands a moment, and LOOK CAREFULLY at the command. Make sure it's the
command you intended, not something else. When you are SURE it's going
to have the desired effect, and won't bring a nasty surprise, THEN go
ahead and hit that ENTER key. =8^)
The above rule applies double anytime you have a * in the command.
BTW, rm, cp, mv, and similar commands, all have a -i (interactive) switch
as well. This will prompt every time the command will overwrite or
delete an existing file. Some distributions alias particularly rm to rm -
i for safety, so you get interactive mode by default. However, don't
depend on this behavior if you or your distribution DOES choose to use
the -i alias form, because sure as you do, at some critical point, the
alias won't be in place when you type the command, and you will WISH you
hadn't done what you just did. But knowing about -i and getting in the
habit of typing it in yourself where appropriate is a good thing. Used
well, it can help prevent that sinking feeling you get when you realize
that rm you typed is taking WAY too long, with the disk still churning
away long after the single file you THOUGHT you were removing should have
been gone.
Hopefully that's useful. =8^)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
- [Pan-users] Help, Bill Wright, 2007/11/04
- Re: [Pan-users] Help, Travis, 2007/11/04
- Re: [Pan-users] Help, Beso, 2007/11/04
- [Pan-users] Re: Help, walt, 2007/11/04
- [Pan-users] Re: Help, Duncan, 2007/11/04
- RE: [Pan-users] Re: Help, Bill Wright, 2007/11/05
- [Pan-users] Re: Help,
Duncan <=
- [Pan-users] Re: Help, Greg Lee, 2007/11/05
- [Pan-users] Re: Help, walt, 2007/11/05
- Re: [Pan-users] Re: Help, Per Hedeland, 2007/11/05
- [Pan-users] Re: Help, Duncan, 2007/11/06
Re: [Pan-users] Help, Evan Morris, 2007/11/06