Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux Tarball Directories Question

Posted on 2013-10-29
2
Medium Priority
?
260 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 400 total points
ID: 39608719
So you wish to create a tarbomb?
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 1600 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month11 days, 6 hours left to enroll

885 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