You can disable tar's removal of absolute paths (including, but not limited to '/' and '../'). It does that so that when you extract the files from the tarball it doesn't overwrite stuff you don't intend it to. It will extract the files, by default, into the local directory where you run the command from - not where the tarball is. Overwriting this default behavior of tar is VERY dangerous can can easily bork your system, permanently! Better to extract stuff to the current directory (and DO NOT do that from the root directory, or as the root user!) and then move it as necessary. If you are the root user, it will preserve ownership and permissions of the extracted files and directories. Again, MAKE SURE you are not in the root (/) directory, or other sensitive places such as /etc, etc... :-)
I'm not running this command from /, or as root. I'm trying to backup the web project that I'm doing from the onine udemy class and it's stored at /var/www/html/udemy/php-oop/gallery/ inside that directory I have a backup directory where I'm trying to store all of my tar balls of the web project as I progress through the lessons and making changes to the project. /var/www/html/udemy/php-oop/gallery/backups/ I want to tar everything under gallery except the backups directory itself. I ran the command tar --exclude-tag-all=backups -cf lesson21.tar ../* from inside the backukps directory that's under the gallery directory. And to get the exclude option to work I created an empty file inside backups directory called, well backups. I'm suing relative paths with this command ../ .
So do I have anything to worry about using relative paths in this sense or from the tar output mentioned above? Thanks rubberman. I thank you've answered more of my questions here on Daniweb than most of my replies combined.
Okay, what will that do? I know when I run tar tvf lessonxx.tar on my tar files that it does list everything inside so it seems to be creating a tar fall will everything I want inside. I'm just wondering about that omitting ../ output.
Gribouillis, you're the other user who's always answered a lot of my posts. Thanks.
i am a student of diploma in electronics and telecomm
can anyone suggest me projects related to the below domains:-
electrical and electronics