The tag has no wiki summary.

learn more… | top users | synonyms (1)

29
votes
5answers
27k views

scp without replacing existing files in the destination

How do I copy an entire directory into a directory of the same name without replacing the content in the destination directory? (instead, I would like to add to the contents of the destination folder) ...
24
votes
2answers
1k views

Is it safe to move a file that's being appended to?

I have a node.js process that uses fs.appendFile to add lines to file.log. Only complete lines of about 40 chars per lines are appended, e.g. calls are like fs.appendFile("start-end"), not 2 calls ...
16
votes
6answers
2k views

Any way to sync directory structure when the files are already on both sides?

I have two drives with the same files, but the directory structure is totally different. Is there any way to 'move' all the files on the destination side so that they match the structure of the ...
15
votes
5answers
8k views

How can I do a “copy if changed” operation?

I would like to copy a set of files from directory A to directory B, with the caveat that if a file in directory A is identical to a file in directory B, that file should not be copied (and thus its ...
14
votes
1answer
1k views

Is there truth to the philosophy that you should sync; sync; sync; sync?

When I was first introduced to Linux, working at Cisco Systems in 2000, I was taught the merits of the sync command, used to flush buffers to disk to prevent filesystem corruption / data loss. I was ...
13
votes
6answers
5k views

How do I copy all files and directories except certain ones over ssh?

Using the Linux command line, I use the scp command to copy up all the files and folders from a certain directory. However, I don't like to consume wasted bandwidth for copying up things I rarely ...
11
votes
3answers
15k views

Sync a local directory with a remote directory in Linux

I have a folder with a few files in it, and some space on a web server. I want to do a bi-directional sync between the local folder and the remote one in linux, just on modification time. How do I ...
10
votes
5answers
14k views

Syncing directories in both directions with rsync

I happen to know about rsyn, and I use rsync to sync between my mac and a linux server as follows. rsync -r -t -v MAC LINUX rsync -r -t -v LINUX MAC I expected to run the first command to sync, but ...
10
votes
4answers
1k views

Is there a way to sync only one partition?

Is there a way to sync only one partition instead of all partitions? Something like "sync /dev/sdc1".
9
votes
2answers
3k views

Why can an unpriviliged user execute the `sync` command?

Currently on Ubuntu Linux, but I noticed this on other OS's too. Apparently any user can execute the sync command, but why is this? I can only see the disadvantage: system slow down due to unnecessary ...
9
votes
3answers
369 views

Stacked filesystems with write-back

I need to setup a system where a laptop and a desktop computers coexist. The idea is, I bring the laptop into the network and the laptop syncs the /home directory( with some exceptions) with the ...
8
votes
4answers
4k views

Note taking app that can sync both android and Linux

I've been looking high and low for an Evernote alternative for Linux. I know I can use Everpad or Evernote in WINE but they don't work natively. Any note-taking app would be fine as long as it can ...
8
votes
3answers
622 views

rsync most recent x GB

I'm looking for a command/script to allow the most recently modified files (up to) 10GB be copied to another computer. So if there are 4 files 4 GB each, only 2 of them should be transferred by the ...
7
votes
4answers
1k views

Keeping config files synced across multiple pc's

I have a few different linux machines and a lot of config files (and folders) on each. For example: ~/.ssh/config ~/.config/openbox/rc.xml ~/.config/openbox/autostart.sh ~/.scripts/ ( folder ) ...
7
votes
3answers
4k views

Why is my EC2 server's time off by ~10 seconds every day?

I have what I believe is a system file, /etc/cron.daily/ntpupdate which runs ntpdate ntp.ubuntu.com daily to sync with the network time. Every day it generates output very similar to this: ...
7
votes
2answers
992 views

sharing or synchronizing history between Zsh and Bash

I often find myself switching between Bash and Zsh, and using the history search functionality to recover a command. However, since Bash and Zsh have different history files, I often find that the ...
6
votes
1answer
762 views

Is there a tool that hooks to two directories and synchronizes them as soon as something changes?

I have huge simulation directories on the two machines server and on cluster which I want to keep synchronized. The basic situation is that files rarely change but when a simulation is done many big ...
6
votes
2answers
108 views

What is the best way to synchronize files to a VFAT partition?

POSIX filenames may contain all characters except /, but some filesystems reserve characters like ?<>\\:*|". Using pax, I can copy files while replacing these reserved characters: $ pax -rw -s ...
6
votes
2answers
703 views

How to prevent user from changing files using linux permission

Is it possible, using linux permission scheme, to allow users create files but not edit or delete them at a later time? I mean, we have a delivery folder where users put artifacts there and we do not ...
5
votes
4answers
461 views

Rsync that handles moves sensibly

I've been successfully using rsync to synchronize my home directories between my laptop and my netbook (both using ext4 with Linux). My only problem with it is that every now and then I like to ...
5
votes
3answers
481 views

Two-way rsync results in oscillating content

I am trying to sync content between two servers. The servers are identical builds (Ubuntu 12.04LTS) and have this cron job running to sync the content: rsync -arzc --update --delete ...
5
votes
1answer
306 views

Using syncing files only comparing file name and not extension

I'm trying to sync 2 folders containing audio files of multiple types (WMA, MP3, M4V,...). I want to sync these folders but the sync process should only take into account the file names, not the ...
5
votes
2answers
160 views

Sync Palm Centro pictures on Linux

I have a Palm Centro, and I'd like to copy the pictures to my computer. However, I'm using Ubuntu, and I don't want to switch to Windows or use Palm's horrible sync application (through Wine.) Is ...
5
votes
1answer
3k views

Rsync — Itemized List of Changes

I've learned that with the -i option, I can get rsync to list all the changes it makes. I've been using it along with the -n or --dry-run options so that I can always learn about all expected changes ...
4
votes
2answers
449 views

How To Synchronize Directories in two different external hard disks?

I have few big folders "cosmo_sim_9", "cosmo_sim_10".... in one of my external hard disk, and a old copy of this on another external hard disk. I want to Synchronize old directories with the new ...
4
votes
3answers
3k views

How do I only copy files to a remote folder on another server that don't already exist in the folder… from the command line in linux?

I have two folders on two different servers. I want to sync files between A and B, however, I only want to copy files that don't already exist in folder B because these files are huge. I don't care ...
4
votes
2answers
2k views

Sync with a Directory Listing of An Apache Server

Is there an easy way to keep a folder synced with a directory listing via HTTP? Edit: Thanks for the tip with wget! I created a shell script and added it as a cron job: remote_dirs=( ...
4
votes
2answers
1k views

How to use rsync with a remote remote host

I am a happy user of rsync -e ssh and use it to synchronize data between my machine and a remote host using rsync -avz -e ssh me@hostA:~/folder ~/folder And this did what I needed until now. I am ...
4
votes
2answers
10k views

How can I move a directory onto an existing directory?

I need to essentially merge changes on two trees, applying the changes from branch 2 to branch 1. I have trees like this: media ├── cd │   ├── 0 │   │   ├── file1 │   │   ├── file2 │   │   └── file3 ...
4
votes
3answers
243 views

anyway to fail/delay a cp process?

This is a hypothetical scenario. Say that I have a particular folder that is being synchronized by a process which is receiving a files/folders via the internet. Now while this operation is in ...
4
votes
3answers
2k views

What is a good tool to sync two computers

At home I've got a pc tower running arch linux. Recently I also acquired laptop for on the road, but I'd like to be working on the pc tower when I'm at home. Now I'm pretty sensitive as to how my ...
4
votes
3answers
3k views

Time synchronization in XFCE 4.8

Apparently there is no gui in XFCE (as there was in gnome) to synchronize time with NTP (if there is one, please let me know the name of the application). So, how can I synch with the time servers? ...
4
votes
1answer
1k views

Do any Linux distributions have a folder sync option (like briefcase in windows)?

I want to keep my local folder synchronized with a network folder. Is there any folder synchronization utility or feature in Linux?
4
votes
2answers
325 views

How can I synchronize processes started in different TMUX panes?

Consider this: tmux split-window -d program1 program2 # this program depends on some side effects produced by program1 In this case, program2 will start before program1 is ready. program1 will send ...
4
votes
2answers
978 views

Syncing multiple home folders with dropbox and symlinks

To keep multiple computers synced with dropbox I tried the following. Approach A. -Computer 1: Install dropbox, dropbox folder: /Dropbox/ -Computer 1: Create symbolic link in that folder to home ...
4
votes
2answers
4k views

Is there a software like Nokia Ovi Suite for syncing Nokia symbian phones with GNU/Linux?

I have been looking unsuccessfully for many days for a nice linux software similar to the Nokia Ovi Suite or Nokia PC Suite for syncing Messages, Contacts etc in Ubuntu/Fedora. There were rumors ...
4
votes
1answer
9k views

Move files and delete directories with rsync?

Recently I needed to delete a large number of files (over 1 million) and I read that doing: rsync -av --delete `mktemp -d`/ ~/source && rmdir ~/source Was one of the most optimized ways to ...
4
votes
3answers
403 views

One-way-sync a directory, but leave deleted files deleted on the destination

I want to sync a directory between two systems. To make it more interesting the syncing must only be done in one direction, i.e.: if a file is deleted in the source directory, it must also be ...
3
votes
3answers
466 views

Backup and synchronization

I want to synchronize my personal document repository between my different computers in my home. Today this folder is under a dedicated partition of the hard drive of a dual boot workstation. My ...
3
votes
1answer
6k views

Real Time Local File Sync

How can I set up an instant file sync for two local directories? The catch is I need it in real time (15, 10 or even 5 seconds is too slow), and I don't want the target root directory created. For ...
3
votes
2answers
2k views

Keep local copy of nfs mount on computer

I mount all my home directories and what ever else on my laptop when it is on my home network. I was wondering if there is a way to keep a local copy of the nfs mount when my laptop is off the ...
3
votes
1answer
1k views

Best way to sync files - copy only EXISTING files and only if NEWER than target

I'm doing this sync locally on Ubuntu 12.04. The files are generally small text files (code). I want to copy (preserving mtime stamp) from source directory to target but I only want to copy if the ...
3
votes
1answer
184 views

Capturing device logs between specific time

We run a test script from a cron regularly , before initiating any actions this test script clears the /var/log/messages and after performing the actions it analyzes the data in /var/log/messages . ...
3
votes
2answers
80 views

How to configure Unison for real peer-to-peer?

I have a handful of devices, and am considering keeping them in sync with Unison. The devices are not running all the time, they are switched off a few hours per day, not necessarily at the same ...
3
votes
2answers
101 views

Can I safely read a file that is appended to by another process?

If process A copies files to some location loc and process B regularly copies the files from loc to some other location, can B read a file that is currently in the process of being copied to loc by A? ...
3
votes
1answer
447 views

Program for two-way synchronization of big files (VM disk images)

I heavily use virtual machines in my work and I need an efficient way of synchronizing them between my PCs. I know of bigsync, but this program works well only for one-way synchronizing (like ...
3
votes
2answers
1k views

How to add/replace only modified/updated files recursively for some 2 folders?

So I currently do stuff like: rm -rf ../../../$CLOUD_INSTALL_SUBDIR/lib_boost mkdir ../../../$CLOUD_INSTALL_SUBDIR/lib_boost cp -r ../../../$BOOST_ROOT_DIR/$BOOST_INSTALL_SUBDIR/lib/* ...
3
votes
1answer
71 views

Configuration management, shared files, etc with a Laptop

I have a couple computers sitting around in my home network. They all run the same version of Ubuntu, and I would like to unify their configuration to some extent. At my university, you can log in to ...
3
votes
2answers
518 views

Syncing two computers with unison and ssh

I have two machines, one is a laptop and the other is a desktop computer located in my room at the university behind a firewall. Is there a way I can use unison to synchronize folders between these ...
3
votes
2answers
500 views

Wait for move directory to be completed before attempting to delete it

I have a process running on one computer that spawns simulations by writing the simulation data to directory pre/id. Worker processes then copy a simulation from pre to a local disk, which can be on a ...