LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Re: More partitions for Linux?

[ILUG] Re: More partitions for Linux?

kevin lyda kevin at suberic.net
Mon Jan 31 23:07:08 GMT 2000


John Gay wrote:
> Thanks for the reply. The reasoning for /opt was, StarOffice wanted to install
> into /opt rather than /usr. I thought this was strange, but the FHS was not very

cd /usr
mkdir /opt
cd /
ln -s /usr/opt /opt

that's my solution to /opt.  (if /opt already exists, move it to /usr,
then do the ln -s)

> cd /usr
> tar cpf - . | (cd /mnt ; tar xpf -)
> 
> So, I need to cd to the directory of choice, and use tar cpf - . to tar the
> directory. I understand c, create, and f, file. I'll look up the p and the - .
> I'm guessing the . is current directory? I tried tar -cvf * var.tar and tar -cvf
> /var var.tar, but both of these put /var into the tar, so when I untarred then,
> everything was still under var/. I'm guessing the p will fix this?

tar    : you know this
c      : create
p      : preserve permisions (rwx and owners, etc)
f      : file name, the next arg will give the name of the file
-      : most commands understand this to mean stdin/stdout.
         tar is one, so this is stdout.
.      : the current directory.  if you make a tar file of
         . and then do a tar t of it, everything will look like
         ./foo, ./bar, ./zoo/cow, and so on.  an ls -a will show
         both . and .. dirs.

the parenthesis around the other two commands force them into a
subshell, so it's almost like piping into a shell script.  that way the
cd command takes effect, and that's also why the cd doesn't affect your
current session - at the end of this command you'll still be in /usr.

kevin
-- 
kevin at suberic.net                              Nutrition Facts
fork()'ed on 37058400		       Puns: 100% RDA  (% good puns: 0)




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell