03-30-2009
Synch only directory sturcture- Help
Hi All,
I am trying to synchronize two folders(test and test1) using rsync. "test" has some sub folders and all of the have some files also. I just want to sync the directory structure not the files in the first folder with the second. i tried the following script.
rsync -av --include '*/' --exclude '*' test/ test1/
its working fine. now my question is how to exclude only a hidden directory, say .ssh and all other files from each of the directories in the first directory. it would be a gr8 help if some one can help me in this..
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey
Excuse me if this question is repeated everywhere but I am still new with scripting and I couldn't apply what I found to my case :confused::confused:
I am trying to run a rec process on a ssh client and at the same time play a file from my computer so i tried this
#!/bin/bash
echo... (3 Replies)
Discussion started by: Antaha
3 Replies
2. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
3. Web Development
I am seeing the following error appear numerous times in my Apache error log:
I have my Apache config configured as below, so I would expect indexing not to occur on this directory as it falls under the parent /web directory.
Strangely all the IP address, including this example, all... (5 Replies)
Discussion started by: crmpicco
5 Replies
4. UNIX for Dummies Questions & Answers
My input is as below :
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt
/splunk/scrubbed/triumph/ifind.triumph.txt
From the above input I want to extract the file names only .
Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies
5. Shell Programming and Scripting
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies
6. AIX
Hi.
My example:
I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that
chown -R log_adm /log/*
chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies
7. Shell Programming and Scripting
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies
8. Shell Programming and Scripting
I'm using a debian variant. My system clock already auto synchronizes. I'd like to have some sort of alert or log entry if the time is ever off by more than a particular amount. My first choice is to have a new file created on the desktop each day that there is a slip greater than the specified... (4 Replies)
Discussion started by: jutnobs
4 Replies
9. Red Hat
I am using ntpd service to sync our RHEL 5.9 system to synch with GPS clock.
When I change the RHEL system time more than 7 seconds than the present system time (through "Datetime" command), ntpd service does not adjust the system time to the present GPS time.But if the time is with in 7 seconds,... (6 Replies)
Discussion started by: Anjan Ganguly
6 Replies
LEARN ABOUT LINUX
rsync_selinux
rsync_selinux(8) rsync Selinux Policy documentation rsync_selinux(8)
NAME
rsync_selinux - Security Enhanced Linux Policy for the rsync daemon
DESCRIPTION
Security-Enhanced Linux secures the rsync server via flexible mandatory access control.
FILE_CONTEXTS
SELinux requires files to have an extended attribute to define the file type. Policy governs the access daemons have to these files. If
you want to share files using the rsync daemon, you must label the files and directories public_content_t. So if you created a special
directory /var/rsync, you would need to label the directory with the chcon tool.
chcon -t public_content_t /var/rsync
To make this change permanent (survive a relabel), use the semanage command to add the change to file context configuration:
semanage fcontext -a -t public_content_t "/var/rsync(/.*)?"
This command adds the following entry to /etc/selinux/POLICYTYPE/contexts/files/file_contexts.local:
/var/rsync(/.*)? system_u:object_r:publix_content_t:s0
Run the restorecon command to apply the changes:
restorecon -R -v /var/rsync/
SHARING FILES
If you want to share files with multiple domains (Apache, FTP, rsync, Samba), you can set a file context of public_content_t and pub-
lic_content_rw_t. These context allow any of the above domains to read the content. If you want a particular domain to write to the pub-
lic_content_rw_t domain, you must set the appropriate boolean. allow_DOMAIN_anon_write. So for rsync you would execute:
setsebool -P allow_rsync_anon_write=1
BOOLEANS
system-config-selinux is a GUI tool available to customize SELinux policy settings.
AUTHOR
This manual page was written by Dan Walsh <dwalsh@redhat.com>.
SEE ALSO
selinux(8), rsync(1), chcon(1), setsebool(8), semanage(8)
dwalsh@redhat.com 17 Jan 2005 rsync_selinux(8)