I want to copy a folder and have the same permission as a existing folder , I tried cp -r -p may copy permission but it also copy everything includes sub-directory and files to new folder , would advise the way how to create a folder with copying all files to new created folder ? thanks
I'm running Xubuntu and it was a challenge just getting Copy.com on there. (I installed the desktop app on both of my computers.) Now that I have it though, I don't really know how to use it.
I know this is kind of more a Copy.com question, but I don't know anything about Copy.com (besides having it--lol) and besides, I like you LQ guys.
So yeah, I installed the desktop app for Copy.com on both of my computers. I know that if I put something in the Copy folder that will be available to both computers.
But how Copy does the backing up I don't know.
When I change a file or folder do I have to plop that into the Copy folder every time or does Copy somehow update the file or folder in the Copy folder automatically? (It doesn't seem to.)
Okay, when I, say, take the Documents folder from one computer and plop it into the Copy folder that's that. Then I take the Documents folder from the other computer and plop that into the Copy folder, then all the files from both folders will be in the Copy folder (and the Copy cloud), right?
Now I just removed a couple of files from a folder and copied and pasted the folder into the Copy folder. But then when I looked at the Copy folder the files I'd deleted were still there. What's the process? How does it work?
I mean, how does this work as a way of backing things up AND organizing things? To me it seems like a decent way of throwing stuff into the Copy folder (and cloud), but how is that different than Google Drive? I mean, that's not really a backup, is it? It's like a flash drive in the cloud.
And when I combined the same folders (with the same titles anyway, but they each had different files within them) from the two computers I'd expected each folder on each computer to have all the same files that were cumulatively on both. Instead, they're the same. And the cumulative is only on the Copy folder.
I like the notion of just throwing the folders and files into the Copy folder. It's much quicker than Google Drive. But the backing up feature eludes me and the syncing feature makes me fearful that I'll lose data or that the files will become hopelessly less organized.
Thanks.
Hey, I'm aware that /etc/ stores config files and in my home directory I also have dot files as well as a .config folder.
And I'm told not to edit /etc/ but create a copy in my home directory to preserve original files. Is it as simple as creating the full path the same as /etc/ and editing it in home folder?
Ideally this is how I hope it works, because I don't want to edit /etc/ and end up with a bunch of custom, non default files.
I am writing a script to check the log file in /var/log , some files are only read by root , but the script use general user to access the system ( as the system do not accept root to ssh directly ) , therefore , it could not read such files .
Would advise what is the best method to solve this problem , copy the file to a special folder ? allow root to ssh ? create a user with root permission ?
very thanks
Hello There
I have an issue in file permission,I have configured an samba share drive,
created user and then shared it with other network computer(WINDOWS 7)
whenever an user creates an folder or file (like Excel) it shows up in read only mode..
I have ran the command :- chmod -R 777 <sharedFolder>
still when the users create a new folder, other cannot edit or modify the file
need help
I am using a shell script named by test.sh, for example containing
Code:
address="$PWD"
echo "$address"
.
If I put it in folder temp1, and run test.sh, then it will give me the address of the current directory. But if I am now in folder temp2, and I want to run test.sh, I always need to copy test.sh to folder temp2, and then run it. Is there a way that I can run test.sh without copying it? I am not root user.
I'm sorry to ask such a simple question but every time I think I figure something out or think I'm going somewhere get stopped dead in my tracks. My friend installed linux on my computer and then moved away immediately so I have no one to help me!
I downloaded the webcam program Cheese. I found through some tutorials that I have to copy the folder to the /opt/ folder and the only way to do that is through the terminal. I found this tutorial and still can't manage to copy the folder. These are the problems I run into:
1. I don't know where to open the terminal. I've tried opening it from the extracted Cheese folder in my downloads folder and from the /opt/ folder itself. It opens up but:
2. when I type the command sudo cp -r cheese /opt/ it will ask for modernnewspeak's password. When I try to type this in nothing happens, even though it JUST let me type in the command. I pressed "enter" thinking maybe it was hiding my password and I get the message "cannot stat 'cheese'. No such file or directory"
please tell me what I'm doing wrong! I tried to follow that tutorial and look through the FAQ here but I cannot figure this out. Thank you in advance!
Hi,
I'm wondering if anyone can help me make a script that searches through a specific folder (in this case /tmp ) for files with a given permissions (755) and then delete all the other files with different permissions?
The correct permission should be, as mentioned 755, and those are the files that should be kept (not deleted).
All other files in this folder with different permissions should be deleted.
Thanks!
Hi all,
I've knowledge about timestamp and i'm trying to use it in a particular scenario. I've multiple folders inside which are different files. Now I'm trying to copy one file (say xyz) which is present in all the folders but has variation in it's content and time of creation into a let's say foldernew.
I'm trying to do this by copying the file xyz from each folders with the new name xyz_(it's orginal timestamp) into folder new.
Can this be done with a single command or do what should I write in a script to execute this?
Note: I want to add the timestamp of xyz when it is created not of the time of copy.
Hello, I have a system that uses a compact flash with a windows os and some other files on it, also somewhere is some sort of encrypted licensing information. I have several of these machines and can use the cf from the others just fine in this machine. But when I take one of those cards and try to copy it with dd, somehow the machine can tell the difference. It's nothing illegal, it's just too old to buy the replacement. Someone has told me they copied successfully in linux with the dd command, but mine aren't working. I also can't tell the brand or type of cf since all the labels have been removed. All i know is that it's a 256mb card. So is there any other options besides dd, or is there a deeper level of dd that i can use to copy this info. I'm using something like:
sudo dd if=/dev/sde of=/home/folder/cfcard
then to copy from my hard drive to the blank cf:
sudo dd if=/home/folder/cfcard of=/dev/sde
I'm using a usb cf reader, and when i have my finished cf everything looks good. Even the machine can read it, it just gives me an error that the cf card isn't a licensed or corrupted.
I have been using this command a lot lately:
Code:
sudo cp -r *.* /<dest folder owned by root>
Goal: to copy all contents of current folder into destination folder.
I know there are other ways, and have tried several, but gave up in confusion (was also in a hurry to get on with it). Finally gave the windows *.* a shot, and it did exactly what I wanted.
Now that my task is completed, it would be nice to know what *.* literally means in Linux. I just looked though man cp, and also ran
Code:
info coreutils 'cp invocation'
but didn't see any '*' options listed. Now I remember having come across '.' before somewhere, in the cp command, so possibly the '*' are ignored, and the only thing that matters is the 'dot'?