Solved

Linux Tarball Directories Question

Posted on 2013-10-29
2
255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Fine Tune your automatic Updates for Ubuntu / Debian
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…
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…
Suggested Courses

623 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