Solved

Linux Tarball Directories Question

Posted on 2013-10-29
2
253 Views
Last Modified: 2013-10-29
Stupid question -

I know how to recursively tarball a directory when I'm in the directory chain right above it...

like say I'm in

/var/www/

and I want to tarball /var/www/httpdocs

I know how to do that.  But - say I don't want the tarball to start with the httpdocs directory...and just want to tarball up everything "from where I am."

So I go into /var/www/httpdocs and tarball from within there...what's the syntax for that?

Thanks!
0
Comment
Question by:erzoolander
2 Comments
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 100 total points
ID: 39608719
So you wish to create a tarbomb?
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 400 total points
ID: 39608721
tar -cvf /path/to/ball.tar .

Note the dot (" .") at the end. It stands for the current directory.

wmp
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question