Displaying 20 results from an estimated 114 matches for "print0".
Did you mean:
printk
2006 Jun 22
9
OT -- BASH
Can someone explain why this:
find . -depth -print0 | cpio --null -pmd /tmp/test
will copy all files in and below the current directory -and- this:
find . -depth -print | grep -v .iso$ | wc -l
will count all the non-iso files -and- this:
find . -depth -print | grep .iso$ | wc -l
will count *only* the iso files -but- this:
find . -depth -print...
2012 Oct 25
1
find with -mtime and -print0 = inaccurate results
If I run this:
find /path/to/files/ -type f -mtime -2 -name *.xml.gz
I get the expected results, files with modify time less than two days old.
But, if I run it like this, with the print0 flag:
find /path/to/files/ -print0 -type f -mtime -2 -name *.xml.gz
I get older files included as well. Anyone know why?
2009 Aug 19
2
replacing permissions on uploaded windows files
Hello,
I've got a CentOS box and users are putting Windows long files on
it, files with " " and " - " in their filenames. I'm trying to adjust the
permissions as well as user and group membership and i'd like the changes to
be sticky. On the tld i've set permissions of 2755 and am trying to batch
convert the files and subfolders in it. I've done this:
find
2006 Jan 13
2
"find" statement: 64bit related??
hi!
3 machines all run this same test script. 2 -i386, 1 x-64bit machine.
this line:
if find / -mount -type f -mtime -1 -print0 | xargs -0 clamscan -l \
$CLAMDAILY $CLAMEXCLUDES -r --no-summary | cut -d: -f1 > $CHANGEDLOG; \
then
the $CHANGEDLOG file... on the 32 bit boxes...oh, probably 220 files. On
the 64bit box 177,999 files lol (Centos 64bit w/everything installed)!
it seems to me that the system is disregarding...
2007 Mar 23
2
Command not running in crontab
...n anoyone tell me why this command is not executed (or it is without
success) from crontab, but works perfectly from the command line ?
(yes, i've restarted crontab service)
# clean up postmaster
00 30 * * * root /usr/bin/find
/var/qmail/maildirs/postmaster at telbit.pt/Maildir/new -type f -print0 |
xargs -0 -n 50 rm
The mind boggles...
Any help would be appreciated.
Warm Regards,
M?rio Gamito
2009 Mar 10
4
rm user:group
I want to remove files but only if they are owned by a certain user and group.
Basically I have this:
find /var/spool/greylist -mmin +363 -exec rm -f {} \;
I want to make sure it only deletes files owned by mail. Basically no
matter what weird characters are in the file names I want to make sure
it does not delete anything outside of /var/spool/greylist. I can add
'sudo -u' to it but
2014 Oct 07
7
[Bug 10857] New: weirdly named files fail remotely
https://bugzilla.samba.org/show_bug.cgi?id=10857
Summary: weirdly named files fail remotely
Product: rsync
Version: 3.1.1
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: samba.org at tange.dk
2002 Aug 01
0
[: Re: [fwd] CVS: ogg123 rocks! vcut no so much so... (from: wayfarer42@postmaster.co.uk)]
...;(cat *.m3u) is good too
> (bash has this nifty temporal named pipe feature, don't know for other shells).
[...]
> Again, ogg123 `ls *.ogg` or ogg123 `find -name '*.ogg' | sort` should do.
> "A program should do one thing and do it well."
Ah, the wonder of Unix. The -print0, -0, and -z below all do the same
thing--end filenames with '\0' instead of '\n' or ' '. The tr command
makes newlines into '\0' for playlists that delimit by newline.
Everything should be standard for any Unix system and should run in
any POSIX-compliant shell (if n...
2011 Apr 02
3
Trouble with 2.0.11 debian package
I wonder if somebody could help me.
If I try clean install of
dovecot-common dovecot-imapd dovecot-pop3d
from
deb http://xi.rename-it.nl/debian stable-auto/dovecot-2.0 main
I got:
Starting IMAP/POP3 mail server: dovecotdoveconf: Fatal: Error in
configuration file /etc/dovecot/dovecot.conf:
service(managesieve-login): executable is empty
failed!
Setting up dovecot-imapd
2014 Feb 11
2
Public folder doesn't work
...dir:/var/vmail/public
subscriptions = no
}
But nothing happened. I tried it with
# Umask for shared folders
umask = 0007
with
subscriptions = yes
tried creating the folder first like this
touch /var/vmail/public/dovecot-shared
chown -R ebox /var/vmail/public
find /var/vmail/public -type d -print0 | xargs -0 chmod 2770
find /var/vmail/public -type f -print0 | xargs -0 chmod 660
But i had no success. Any Ideas how to get it running?
Here is my dovecot -n output
# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-58-generic x86_64 Ubuntu 12.04.4 LTS ext4
auth_gssapi_hostname = mailand.sx...
2006 Aug 22
1
rsync performance
...7.93
lion:/homes/atg/ ========= Tue Aug 22 12:47:48 CEST 2006 ==================
1232323 files / 1960 sec = 629 files/sec
In comparison, on the large filesystem, 'find'ing all files on the
source system and 'stat'ing them takes 1.75 minutes:
source# time find /homes -xdev -print0 | xargs -0 stat -c "%s %Y" | wc -l
1232287
real 1m41.987s
user 0m7.075s
sys 0m33.216s
On the destination 4 minutes:
dest# time find /backup/lion-homes -xdev -print0 | xargs -0 stat -c "%s %Y" | wc -l
1233202
real 4m3.650s
user 0m9.895s
sys 0...
2015 Mar 20
1
Centos 6: setfacl: .: Argument list too long
...ote:
> Dear all,
>
>
> I have a Centos 6 (64bit) server used for samba and ACL control.
> There has a folder which a lot of user can access, when I add a new user's ACL, but failed, do you know how to resolve this problem?
use xargs like in:
|find . -name "*.pdf" -print0 | xargs -0 RUNACOMMAND
robert
|
>
>
> [root at s1 abc]# getfacl /abc
> # file: abc
> # owner: root
> # group: root
> user::rwx
> user:user01:---
> user:user02:---
> user:user03:---
> ...
> user:user25:---
> group::r-x
> mask::r-x
> other::r-x
> [roo...
2009 Oct 05
2
gnu --target-dir, how to fake with rsync?
...; mv type
commands they have the
--target-dir="dir"
option. It lets you put the destination directory as the first
argument to cp and mv instead of the last argument.
They added the option to get cp & mv working well with xargs for
stuff like this:
find ./ -type file -mindepth 3 -print0 | xargs -r0 cp
--target-dir=/home/sam/stuff/otherstuff/morestuff --
then xargs puts all of the files found by find after the --
Before I learned about this argument I used to do stuff like the "-i"
and "-n" options
find ./ -type file -mindepth 3 -print0 | xargs -r0 -iTARGET...
2012 Mar 29
1
Defect ISO generation after yum upgrade
...ISO files
#!/bin/bash
BUILDPATH=/proxygen
GENERATEDPATH=/var/www/html/proxy/generated
# if build command contains buildsystem a new system is build
if [[ $@ = *buildsystem* ]]; then
# Build initramfs
rm -f $BUILDPATH/boot/system.igz
chown -R 0:0 $BUILDPATH/system
cd $BUILDPATH/system
find . -print0 | cpio --null -ov --format=newc | gzip > $BUILDPATH/boot/system.igz
fi
# Build file containing config
rm -f $BUILDPATH/boot/config.igz
cd $BUILDPATH/config
find . -print0 | cpio --null -ov --format=newc | gzip > $BUILDPATH/boot/config.igz
# Build ISO
cd $BUILDPATH/boot
mkisofs -o $GENERATED...
2011 Feb 24
4
ls returns file doesn't exist, find finds it??
Howdy,
I am getting some errors with find and ls command - such that find is
able to see a file whereas ls says the file doesn't exist. Initially I
was trying find and ls together as:
# find ./ -type f -mtime +15 | xargs ls
Similar behavior is seen even when I execute both commands separately.
Any thoughts on what might be wrong here?
--
thanks,
neubyr
2010 Oct 23
1
[PATCH] Make appliance-building work on systems with default library search paths differing from the appliance's
...missing.
- @FEBOOTSTRAP_RUN@ initramfs -- mkdir -p --mode=0755 /selinux
+ bootstrap_run initramfs -- mkdir -p --mode=0755 /selinux
# Nuke some stuff. The kernel pulls mkinitrd and plymouth which pulls in
# all of Python. Sheez.
(cd initramfs && find -name '*python*' -print0) |
- xargs -0 @FEBOOTSTRAP_RUN@ initramfs -- rm -rf
+ xargs0_bootstrap_run initramfs -- rm -rf
(cd initramfs && find -name '*plymouth*' -print0) |
- xargs -0 @FEBOOTSTRAP_RUN@ initramfs -- rm -rf
+ xargs0_bootstrap_run initramfs -- rm -rf
(cd initramfs && f...
2015 Feb 04
3
Resubmission after N days
...r these 5 days.
>> - After 5 days the mail should be moved to my inbox again.
>
> What mail storage are you using? With Maildir all messages are plain files, you could move those messages into a specific folder and do:
Yes, I use Maildir
>
> find /path/to/folder -mtime +$days -print0 | \
> xargs -r0 mv -t /path/to/INBOX/new
Yes, this should work. But a solution which uses IMAP would be preferred.
Thomas
--
http://www.thomas-guettler.de/
2001 Nov 20
2
patch to enable faster mirroring of large filesystems
...--source-list SRC arg will be a (local) file name containing a list of files, or - to read file names from stdin
--null used with --source-list to indicate that the file names will be separated by null (zero) bytes instead of linefeed characters; useful with gfind -print0
--send-dirs send directory entries even though not in recursive mode
--no-implicit-dirs do not send implicit directories (parents of the file being sent)
The --source-list option allows me to supply an explicit list of filenames
to transport without using the --recursive...
2018 Apr 07
0
Is it possible to clone an NT ACL from one file or dir to a totally different file or dir ?
...$TEMPLATE) # get the template top-level
POSIX group
TEMPLATE_PERMS=$(stat -c %a $TEMPLATE) # get the template top-level
POSIX permissions
current_dir=$(dirname $(readlink -f $0)) # script can run from another
directory
if [ $RECURSE == 1 ]
then
find $TARGET -type $FIND_FLAG -print0 | xargs -0 -n1 -P$CORES
chown $TEMPLATE_OWN;
find $TARGET -type $FIND_FLAG -print0 | xargs -0 -n1 -P$CORES
chgrp $TEMPLATE_GROUP;
find $TARGET -type $FIND_FLAG -print0 | xargs -0 -n1 -P$CORES
chmod $TEMPLATE_PERMS;
# get the template POSIX extended attributes, which in...
2006 Aug 03
2
(no subject)
.... If you remove all the index files, etc from the mailbox when you switch
> between the two, or compile with the specific offset, it should work
> fine.
You're right. I should have looked closer at the log entries. I went to my maildir and
ran a find . -name "dovecot.index*" -print0 | xargs -0 rm -f, which got rid of all the
index files, but left the uidlists alone. That worked. The 64 bit dovecot is now
running
fine. So I guess we know that a 32 bit and a 64 bit dovecot can't both use the same
mail store.
Doesn't the dovecot front page talk about sanity checks bei...