search for: xargs

Displaying 20 results from an estimated 554 matches for "xargs".

Did you mean: args
2011 May 17
3
xargs with max each line / argument
How do I pass xargs input one line at a time to subsequent command? For example I want to install rubygems by reading a text file as shown below, however the arguments are getting passed all at once to the 'gem install' command. I hace tried -L (max-lines) and -n (max args) options, but it didn't work. Wha...
2005 Feb 08
6
help with xargs and mv
...messages ID cut -b -14 file2 > file3 # prepend '*' to message IDs sed "s/^/\*/" file3 > file4 All of this works the way that I expect. What I now want to do is to mv all of the related files listed in file4 in the form "*messageid" to another directory. Using xargs I expected (naively) that the following construction would work: cat file4 | xargs mv /var/spool/mqueue/'{}' \ /var/spool/mqueue/offline (note that in the original this is all one line.) However, when I do this I get the error: mv: when moving multiple files, last argument must be...
2017 Jul 06
3
[Bug 2739] New: ssh-add no longer works with xargs
https://bugzilla.mindrot.org/show_bug.cgi?id=2739 Bug ID: 2739 Summary: ssh-add no longer works with xargs Product: Portable OpenSSH Version: 7.4p1 Hardware: amd64 OS: Mac OS X Status: NEW Severity: minor Priority: P5 Component: ssh-add Assignee: unassigned-bugs at mindrot.org Reporter: micahculp...
2002 Jan 18
5
contrib/solaris/opensshd.in patch
...ession) onanother_note: the buildpkg.sh could use some exec_prefix functionality... to deal with ./configure --prefix= --exec_prefix=/usr *** bak/opensshd.in Fri Oct 19 13:36:24 2001 --- opensshd.in Fri Jan 18 11:47:10 2002 *************** *** 8,16 **** KILL=/usr/bin/kill PS=/usr/bin/ps XARGS=/usr/bin/xargs prefix=%%openSSHDir%% --- 8,19 ---- KILL=/usr/bin/kill PS=/usr/bin/ps XARGS=/usr/bin/xargs + FGREP=/usr/bin/fgrep + EGREP=/usr/bin/egrep + ME=`/usr/bin/basename $0` prefix=%%openSSHDir%% *************** *** 22,29 **** killproc() { _procname=$1 ! _signal=$...
2009 Aug 19
2
replacing permissions on uploaded windows files
...ot; - " 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 tld -type f |xargs chmod 644 {} \; find tld -type d |xargs chmod 755 {} \; Both of these are failing due to the spaces and dashes. I've tried enclosing those {} in quotes, no good. Has anyone done this with shell or perhaps perl? Thanks. Dave.
2009 Oct 05
2
gnu --target-dir, how to fake with rsync?
...those who've never used this option - for the GNU cp & 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" option...
2018 Apr 13
1
backup-script/backup_samba4
...$KEEP_DAY1 and $KEEP_DAY2 of the month. if [ ${KEEP_DAYS} = "yes" ]; then     ${DEBUG} "Deleting any backup files over ${DAYS} days old, keeping date $KEEP_DAY1 and $KEEP_DAY2 of the month."     ${CMD_FIND} ${STOREDIR} -name "*.bz2" -mtime +${DAYS} -type f -print | xargs -0 | egrep -v '\-$KEEP_DAY1\-|\-$KEEP_DAY2-' | xargs ${CMD_RM} >/dev/null 2>&1 fi should be if [ ${KEEP_DAYS} = "yes" ]; then     ${DEBUG} "Deleting any backup files over ${DAYS} days old, keeping date $KEEP_DAY1 and $KEEP_DAY2 of the month."     ${CMD_FI...
2018 Sep 11
2
Re: [PATCH nbdkit 1/4] build: Move list of plugins and filters to the configure script.
...n_lang_plugins="\ > + curl \ > + data \ > + example1 \ > + example2 \ Inconsistent spacing (space-vs-tab doesn't matter in this particular context, but it looks weird to use both) > + " > +plugins="$(echo $lang_plugins $non_lang_plugins | xargs -n1 | sort -u | xargs)" Your use of xargs as a reformatter is interesting ;) Could also be spelled: $(echo $lang_plugins $non_lang_plugins | tr -s ' \t\n' ' ' | sort -u | tr ' ' '\n')" but that's longer to type, so your version is fine. -- Eric Bl...
2011 May 17
5
Feed a list of filenames to vim
There are some googlable ways to feed a list of filenames to vim, but I stumble on weird results. With my filelist, I try to do cat list | xargs vim ...to edit the files listed in the file "list". Here's what happens: [root at lasso2 tempdir]# ls -l total 8 -rw-r--r-- 1 root root 0 May 17 18:28 a -rw-r--r-- 1 root root 0 May 17 18:28 b -rw-r--r-- 1 root root 3 May 17 18:31 c -rw-r--r-- 1 root root 12 May 17 18:43 list...
2001 Oct 17
3
Again: bugs in contrib/solaris/opensshd.in and buildpkg.sh
...n me: wrong filename in last posting, now here are correct diffs) in contrib/solaris/ (openssh-SNAP-20011017.tar.gz) 1) buildpkg.sh makes wrong link for /etc/init.d/opensshd 2) /etc/init.d/opensshd has not-working killproc here my version tested on Solaris 2.4 and 8 (no pgrep with solaris 2.4, XARGS was undefined, simpler syntax) J?rg --- contrib/solaris/buildpkg.sh Fri Oct 12 22:30:53 2001 +++ contrib/solaris/buildpkg.sh Tue Oct 16 13:53:07 2001 @@ -40,9 +40,9 @@ ../opensshd.in > $FAKE_ROOT/etc/init.d/opensshd chmod 711 $FAKE_ROOT/etc/init.d/opensshd -ln -s $FAKE_ROOT/etc/init....
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
2006 Oct 31
0
6323628 /usr/xpg6/bin/xargs will coredump if given -n or -s flags with no argument.
Author: ceastha Repository: /hg/zfs-crypto/gate Revision: 4fa98e79aa8cacc3ee6e3642cf306228cc9edcd1 Log message: 6323628 /usr/xpg6/bin/xargs will coredump if given -n or -s flags with no argument. Files: update: usr/src/cmd/xargs/xargs.c
2009 May 19
9
Hang at 5:34 pm EST
...* * * /usr/share/astguiclient/AST_DB_optimize.pl ## adjust time on the server with ntp 30 * * * * /usr/sbin/ntpdate -u 18.145.0.30 2>/dev/null 1>&2 ### remove old recordings more than 7 days old #24 0 * * * /usr/bin/find /var/spool/asterisk/monitor -maxdepth 2 -type f -mtime +7 -print | xargs rm -f ### remove old vicidial logs and asterisk logs more than 2 days old 28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f 29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f 39 10 * * * /etc/webmin/cron/tem...
2008 Feb 22
2
Find files
Hi, I am trying to delete files that are more than 7 days old. When I run it interactively it works, no problem, but it does not run from a file stored in cron.daily. The rest of that daily file runs properly. [The execute bit is on]. I don't see anything in the /var/log/messages. --------------------------------------- #!/bin/bash find /mnt/iog -type f -name '*.tar.gz' -mtime +7
2001 Mar 04
1
streaming Vorbis: trials & errors with Icecast 2
...g | example 8000 So I tried it like this: [root@localhost dlphilp]# cat /home/dlphilp/soundfiles/oggfiles/*.ogg | example 8000 Connected to server... DEBUG: Send error: 0... Broken pipe Okee, so I asked Jack about this and he suggested this: cat ogglist | xargs example 8000 and that gets me this error: [root@localhost dlphilp]# cat ogglist | xargs example 8000 Connected to server... [root@localhost dlphilp]# which looks good but nothing is happening. Then Jack suggested this syntax: cat ogglist | xargs cat | example 800...
2012 Apr 09
5
Need to split long lines in mail archives
...s best done at the time of the original file's creation. I am looking for a way to deal with multiple existing files in a batch fashion so that the reformatted file is written back out to the same file name oin the same location. I cannot seem to hit upon a way to get this to work using find, xargs and fmt (or fold). Nor can I seem to find an example of how this might be done using these utilities. What I would like to discover is the functional equivalent of this: find /path/to/archives/*.html -print | xargs -I {} fmt -s {} > {} This syntax does not work of course because the xargs fi...
2002 Jul 16
1
opensshd.in
...nate method" too many times. Would this cause anyone any grief? --- opensshd.in.old Sun Oct 21 16:42:02 2001 +++ opensshd.in Mon Jul 15 19:34:16 2002 @@ -3,11 +3,8 @@ # # Stripped PRNGd out of it for the time being. -AWK=/usr/bin/awk CAT=/usr/bin/cat KILL=/usr/bin/kill -PS=/usr/bin/ps -XARGS=/usr/bin/xargs prefix=%%openSSHDir%% etcdir=%%configDir%% @@ -20,12 +17,6 @@ HOST_KEY_DSA=$etcdir/ssh_host_dsa_key HOST_KEY_RSA=$etcdir/ssh_host_rsa_key -killproc() { - _procname=$1 - _signal=$2 - ${PS} -u root | ${AWK} '/'"$_procname"'$/ {print $1}' | ${XARGS}...
2007 Jul 03
2
[LLVMdev] "bytecode" --> "bitcode"
I did this short experiment: ggreif at my [!297] cd /home/ggreif/llvm ggreif at my [!298] find . -name "*.cpp" | xargs grep bytecode | wc -l 143 I guess these are a quick prey for perl's in-place replace. But wait! There are more: ggreif at my [!299] find . -name "*.cpp" | xargs grep -i bytecode | wc -l 291 probably all of the rest is "Bytecode" ggreif at my [!300] find . -na...
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
2002 Aug 01
0
[: Re: [fwd] CVS: ogg123 rocks! vcut no so much so... (from: wayfarer42@postmaster.co.uk)]
...' '. 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 not, yell at me): 1. All oggs under '.', unsorted: find . -name '*.ogg' -print0 | xargs -0 ogg123 2. All oggs under '.', sorted by name: find . -name '*.ogg' -print0 | sort -z | xargs -0 ogg123 3. All oggs under '.', sorted by starting number find . -name '*.ogg' -print0 | sort -z -n | xargs -0 ogg123 4. Playlist, unsorted (m3u format): tr &quo...