Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
I'll admit I find the copying of hidden files in bulk a little confusing myself so I'll post a link: https://www.linuxquestions.org/quest...nother-387107/
Because what I wanted to post is that "*.*" is a DOS thing and unless that's exactly what you want to do -- copying all files which have some characters, then a dot, then some characters, you shouldn't use it under Linux. With Linux there are often no "file extensions" so when wanting to copy everything it's simply:
Code:
cp * /the/destination/
Though, as discussed in the thread I linked to, that doesn't copy files beginning with a dot either.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
No, just using * won't copy hidden files, just how it's designed I suppose.
What exactly are you trying to do though? A graphical file manager would allow you to copy anything you want, for example. Or something like rsync can be used to synchronise files. Or, you could just copy your full home directory to somewhere else if that's all you want to de.
As I mentioned check out the thread I linked to for other ideas.
I have my profile with lot of hidden files such as .bash_history, .bashrc,.bashrc.bak,.lesshst,.profile,.profile.belvedere,.ssh, and I want to copy all files from my profile(including hidden) to directory like /pvt.
If that is the case then cp should work. I have got many hidden files in my profile as well and I have copied my entire home directory to /tmp and it copied hidden files as well. I used the same command as I mentioned in my previous post:
Code:
cp -arv /home/your_home_directory/. /destination
Make sure you are putting a dot (.) as I mentioned in the source. If it does not work then you have to explain the requirement in more detail because on the basis of what you said it works perfectly fine for me.
You can use rsync but I don't see anything wrong with cp.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
By the way, I made mention of rsync because I have no idea what the full requirement here is. rsync works well for keeping things synchronised, the clue in the name, but for a one off copy I'd probably not use it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.