1
vote
4answers
97 views

Avoiding users to corrupt and use a script

Is it possible to deny the right to copy files? I have a script which should be executable by others. They are also allowed to read the file (though it would not be a problem to forbid reading). But ...
6
votes
3answers
2k views

FTP - how to upload multiple files to FTP from linux server?

I have for example database backups in my linux server and I would like to write a script to upload it to remote FTP. I tried put command, but it can only transfer one file at a time. Then tried mput ...
0
votes
1answer
1k views

Using Mac OS X terminal to copy a selection of folders to a new location, with merge behavior

I have a folder 'foo' that contains a lot of sub folders, e.g. foo |---20101 |---20102 |---20103 |---20111 |---20112 |---20113 There are way more than this, but hopefully it explains the ...
1
vote
1answer
2k views

Unix Copy (cp) without Symbolic Links

I want to copy my files but convert the symbolic links to hard links (ie. the actual file). How can I do this? Here's my code (that isn't working): cp -RL ${FROM_DIR} ${TO_DIR} Note: this is for ...
3
votes
2answers
242 views

How do I copy a file and append a number inside?

This one has baffled me – I'm actually trying to make a Thunar custom action to copy the selected file into the same directory appending a number before the extension, e.g. cp file.ext file_1.ext ...
2
votes
1answer
511 views

shell scripting: iterating through directories and moving/renaming files

(FYI, I have very little shell scripting knowledge) I have a ton of files and directories that look something like -root -dir1/a.txt -dir2/a.txt -dir3/b.txt -dir4/b.txt -dir5/c.txt I would ...
10
votes
6answers
9k views

How do I queue multiple files for copying on a Mac?

When I copy multiple files on a Mac, the system tries to copy them all at the same time. The problem is two-fold. First of all, when you select multiple files and copy them, they all go into one ...
1
vote
2answers
121 views

When copying directories with sudo it copies just the first level of its hierarchy

This question was also asked here. When I copy some directory (dir) recursively with sudo in bash it copies just the first level of the dir hierarchy, but when used without sudo it copies the dir ...
0
votes
1answer
89 views

When copying folders with sudo it copies just the first level of folder's hierarchy

When I copy some directory (dir) recursively with sudo in bash it copies just the first level of the dir hierarchy, but when used without sudo it copies the dir with all its subdirs, though commands ...
3
votes
3answers
7k views

Linux: Copy all files matching pattern from dir and subdirs into a single dir

If I wanted to copy all *.so files from src to dst I'd do: cp src/*.so dst However, I want to copy all *.so files from src and it's subdirs into dst. Any clues?
2
votes
3answers
307 views

Copied directory appears to become larger at destination

I have the following code as part of a shell script: while [ $(ps -ef | awk '{print $2}' | grep -F "$CPPID") ]; do sleep 10 awk -v "usbsize=$(/bin/df | grep -F $DEVICEMOUNTPOINTQ | awk ...
2
votes
1answer
78 views

script to compare dates within a diven dir (incl. subdirs)

I would like to write a bash script (or just use a command in the CLI) to find all the instances within a given directory and its subdirectories for a given time period copy those files into a ...