Just put list of exclude patterns in a file eg /tmp/nosync.txt
Now run
If this looks like what you want to do remove the --dry-run option to actually do the copy.
To do a move instead of copy you can use --del and --prune-empty-dirs. There are heaps of other options that control how rsync works so check the manual for other options you man want to consider.
This User Gave Thanks to Chubler_XL For This Post:
Another Unix question. How would I copy multiple directories at the same time? Right now I do:
cp -r -f /directory1/ ../backup/directory1/
I do that for each directory one at a time. But there are multiple directories I'd like to copy. So instead of sitting there and doing one at a time, is... (9 Replies)
Can we copy a file to multiple directories using a single command line , i tried with * didnt work for me
cp /tmp/a.kool /tmp/folder/*/keys/
I am tryn to copy a.kool file to all keys folder in /tmp folder. is something i am missing ? (4 Replies)
Hi again All :)
After posting my first thread just a few eeks ago and having such a great response (Thank You once again :) ), I thought I'd perhaps ask the experts again. In short I'm trying to achieve a "find" and "copy" where the find needs to find directories:
find -d -name outbox
and... (6 Replies)
Hello all,
I'm trying to copy all files within a specified directory to another location based on a find filter of mtime -1 (Solaris OS). The issue that I'm having is that in the destination directory, I want to retain the source directory structure while copying over only the files that have... (4 Replies)
Hi,
Seems like I need help again with a problem:
I want to delete all files from my lets say "Music" Directory inkluding all of the subfolders
except for .mp3 and .MP3 files.
I tried it with globalignoring mp3 files, finding and deleting all other files, which
resulted in all files... (3 Replies)
I have the following that I'd like to do:
1. I have split a file into separate files that I placed into the /tmp directory. These files are named F1 F2 F3 F4.
2. In addition, I have several directories which are alphabetized as dira dirb dirc dird.
3. I'd like to be able to copy F1 F2 F3 F4... (2 Replies)
I have a simple script which copies directory from one place to another and deleting the source .
I am facing a situation when new files gets added when the script has started running. Its resulting in data loss
Please suggest a way to avoid data loss. I googled a lot but most are perl... (11 Replies)
Hello, I have two .odt files extensions and I tried running diff command like this
$ diff A_old.odt A.odt
It just returns this output, that they are different but doesnt tell me where they are different
Binary files A_old.odt and A.odt differ
so does diff command work only if the... (1 Reply)
Hi,
I have a requirement where I have to connect to another server and copy directories from one server to another
Directories on the Source server look like below (YYYY-MM-DD- 1 to 23)
drwxr-xr-x 2 test_user dmfmart 422 Sep 1 23:45 2014-09-01-18
drwxr-xr-x 2 test_user dmfmart ... (3 Replies)
guys, i did create a script but its too long, though it function the same.
# cat nightlyscan.sh
#!/usr/ksh
deyt=`date +"%Y-%m-%d"`
for i in `ls -lrt|grep $deyt|awk '{print $9}'`
do
cp -f $i /S1/Sophos/logger/
done
#
but i did not paste it all.
this is the desired. (9 Replies)
Discussion started by: kenshinhimura
9 Replies
LEARN ABOUT CENTOS
xdg-user-dirs-update
XDG-USER-DIRS-UPD(1) User Commands XDG-USER-DIRS-UPD(1)NAME
xdg-user-dirs-update - Update XDG user dir configuration
SYNOPSIS
xdg-user-dirs-update [OPTION...] [--set NAME PATH...]
DESCRIPTION
xdg-user-dirs-update updates the current state of the users user-dirs.dir. If none existed before then one is created based on the system
default values, or falling back to the old non-translated filenames if such directories exists. The list of old directories used are:
~/Desktop, ~/Templates and ~/Public.
If an old configuration exists it is updated with any new default directories. Additionally, any configured directories that point to
non-existing locations are reset by pointing then to the users home directory. This typically happens when the users removed the directory,
so they likely don't want to use it anymore.
On the first run a user-dirs.locale file is created containing the locale that was used for the translation. This is used later by gui
tools like xdg-user-dirs-gtk-update to detect if the locale was changed, letting you to migrate from the old names.
xdg-user-dirs-update is normally run automatically at the start of a user session to update the XDG user dirs according to the users
locale.
OPTIONS
The following options are understood:
--help
Print help output and exit.
--force
Update existing user-dirs.dir, but force a full reset. This means: Don't reset nonexisting directories to HOME, rather recreate the
directory. Never use backwards compatible non-translated names. Always recreate user-dirs.locale.
--dummy-output PATH
Write the configuration to PATH instead of the default configuration file. Also, no directories are created.
--set NAME PATH
Sets the XDG user dir with the given name.
NAME should be one of the following:
DESKTOP
DOWNLOAD
TEMPLATES
PUBLICSHARE
DOCUMENTS
MUSIC
PICTURES
VIDEOS
PATH must be an absolute path, e.g. $HOME/Some/Directory.
FILES
The XDG user dirs configuration is stored in the user-dirs.dir file in the location pointed to by the XDG_CONFIG_HOME environment variable.
ENVIRONMENT
The XDG_CONFIG_HOME environment variable determines where the user-dirs.dirs file is located.
SEE ALSO xdg-user-dir(1), user-dirs.dirs(5), user-dirs.defaults(5), user-dirs.conf(5).
XDG XDG-USER-DIRS-UPD(1)