Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am a bit ashamed to ask such a question after five years I switched to linux, but I remained globally hostile to command line mode unless I couldn't avoid it...
And here, I need to have a command line function work, and I don't manage to have a parameter understood.
I will be grateful if you help
The command is very simple, it's tar. I can log into my server's storage with ssh and then backup everything, file permissions and all, it's the best for a backup. But I don't manage to exclude a precise folder
tar -cvf bak20071024.tar *
This one works. But I don't find how I can have a correct syntax to exclude a folder called "test"
You are probably backing up a live system. The file may have been removed before it could be backed up, or you tried to follow a dead link. Or you could have a correct directory (a file from the kernels point of view).
I don't know which directories you are trying to backup. Backing up the root directory without excluding /tmp, /dev, /tmp and other directories may not be the best idea.
I'm not certain, but if you use the -g <snapshot-file> option when creating an archive, it may ignore files that were altered after the start of the tar job. See section 5.2 of the info manual for examples of using snapshot files and incremental backups.
As for me, this is indeed to save the files from a live server (in mutualized [or should I say "shared", in english ?] hosting, so fortunately there is no filesystem to save, it's only that it's possible that cache, cookies and session files might differ from the beginning to the end of the archiving.
I'm saving everything in www/*
I made tests, and the bug only occurs when i try to exlude things from the archiving, I simply gave up on the exclusion.
However, I just only saw that tar -cvf bak.tar * does NOT save .htaccess files for me o.O
Would you guys imagine why ?
The options for the tar never spoke about ignoring or not ignoring hidden files... I am troubled...
find . -print | grep -v ^\./test | xargs tar -cvf bak.tar
This causes duplicates because it is passing the directories as well as the contents of the directories.
You could use the '-type d' option to just pass directories but then you would still have subdirectories being passed (hence duplicates), the best that you could do is have it find only files '-type f', but not sure how this would handle named pipes and symbolic links.
Also, why bother? seems an extreeme measure to pass info into tar in this way.