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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Why would you put a backslash in front of the asterick? You are looking for a single file named "star-dot-s-o" by doing that. I'm not surprised you don't have that particular file on your system.
Why would you put a backslash in front of the asterick? You are looking for a single file named "star-dot-s-o" by doing that. I'm not surprised you don't have that particular file on your system.
u do that without \ !!!
it does not change the result !!
lets search conf file in /etc with \ ! find /etc -name \*.conf . ! do u get unexpected result ???????
I did not initially notice your lack of quotes in the find command. I always use them myself, but I now see that you don't, which is fine.
There is a difference between:
find . -name "*.conf" -print
and
find . -name "\*.conf" -print
... which is what I was describing. My error for not noticing your lack of quotes in your initial post. Sorry about that.
Quote:
tar cpvzf backup /etc ----> it does not contain so files and other files , which are not regular files !!
Maybe I'm reading your above sentence differently than you intended, but *.so files ARE regular files.
Could be you actually meant "it does not contain so files, and other files that are not regular files"
Whatever, *.so files SHOULD be included in your backups given the way you wrote the tar command in your example. I have no idea why they are not.
I did not initially notice your lack of quotes in the find command. I always use them myself, but I now see that you don't, which is fine.
There is a difference between:
find . -name "*.conf" -print
and
find . -name "\*.conf" -print
... which is what I was describing. My error for not noticing your lack of quotes in your initial post. Sorry about that.
Maybe I'm reading your above sentence differently than you intended, but *.so files ARE regular files.
Could be you actually meant "it does not contain so files, and other files that are not regular files"
Whatever, *.so files SHOULD be included in your backups given the way you wrote the tar command in your example. I have no idea why they are not.
thx man for your reply .
but still i have problem !
Normally I don't expect to find library files in the /etc directory.
I did a check on my system and indeed the only .so files I can find are those in /etc/alternatives which are soft-links to files in /usr/lib and /usr/lib32.
Doing a tar -cpzvf test.tar /etc backups those links without a problem.
System tested Kubuntu 12.04.
You did not tell us what distro/version you are using, so we will not be able to tell you what's normal for your system.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
Using tar is a very old way to backup. TAR stands for TapeARchive. Tape drives cannot accommodate thousands of small files, and the tape sector sizes are sometimes different than a disk drive, so operators once used tar to make one large file and then streamed it to tape using dd, or the opposite, which also works.
But now you can stream dd through gzip and make compressed backups quite a bit faster than tar. And, the dd generated backups when restored to a completely lost system will still boot the system. All you need to do is restore the backup, and the system is complete. See: http://www.linuxquestions.org/questi...ommand-362506/
Normally I don't expect to find library files in the /etc directory.
I did a check on my system and indeed the only .so files I can find are those in /etc/alternatives which are soft-links to files in /usr/lib and /usr/lib32.
Doing a tar -cpzvf test.tar /etc backups those links without a problem.
System tested Kubuntu 12.04.
You did not tell us what distro/version you are using, so we will not be able to tell you what's normal for your system.
Cheers
so files are apache modules like mod_ssl.so mod_ldap.so mod_authnz_ldap.so and so on ...
if u have apache u can find them in /etc/httpd/modules
my distro is centos 6.4 . and i used tar (GNU tar) 1.23.
Using tar is a very old way to backup. TAR stands for TapeARchive. Tape drives cannot accommodate thousands of small files, and the tape sector sizes are sometimes different than a disk drive, so operators once used tar to make one large file and then streamed it to tape using dd, or the opposite, which also works.
But now you can stream dd through gzip and make compressed backups quite a bit faster than tar. And, the dd generated backups when restored to a completely lost system will still boot the system. All you need to do is restore the backup, and the system is complete. See: http://www.linuxquestions.org/questi...ommand-362506/
thx man but problem is dd cannot make a copy from a directory !
i want to backup from /etc/httpd/ and dd cannot do that . dd if=/etc/httpd of=/mnt/apache bs=64k conv=notrunc,noerror it does not work !
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.