Skip to main content

Questions tagged [xargs]

utility in Unix-like operating systems for passing large numbers of arguments to programs that can only take a small number of arguments

0 votes
0 answers
60 views

I'm experimenting with Docker images having 20-70 GiB in a single layer (yes, the software/compiler is so fat). To improve the download and decompression efficiency of Docker, I'm splitting this fat ...
Paebbels's user avatar
  • 189
1 vote
1 answer
320 views

I know when you run into problems with piping the output of e.g. find .. to xargs due to 'strange' filenames, it can help to use a specific delimiter (e.g. \0) to actually pass full filenames (e.g. ...
frans's user avatar
  • 1,209
0 votes
1 answer
110 views

I'm executing output (with additional argument --version) of find in the following way: $ find NDK -name clang -executable -type f | xargs -I{} bash -c "exec {} --version" Android (7714059, ...
pmor's user avatar
  • 464
0 votes
3 answers
133 views

I'm running the following command to alias an entire folder of scripts: ls | grep '\.sh$' | sed 's/\.sh$//' | awk '{print "alias "$1"=\"./"$0".sh\""}' | xargs -...
Maxime Franchot's user avatar
1 vote
2 answers
327 views

I have a file with a list of files and directories, containing the wildcard *. I am trying to output the size of the entries with du and would like a grand total. If I start with: cat file | xargs du -...
Francisco Leon's user avatar
2 votes
1 answer
4k views

(There is plenty of information about this on bash, but much less on zsh and NOT AT ALL for TWO or more files. No idea how to apply the ^ ("caret") TO MORE THAN ONE FILE). I want to know (...
nostromo's user avatar
  • 213
0 votes
1 answer
115 views

I want to duplicate some text a few times. Xargs doesn't do more than 5 items. I don't know if there is a better way to do this. echo "sometext " | xargs -n 9 -t -I RRRR echo RRRR RRRR RRRR ...
nelaaro's user avatar
  • 14.2k
0 votes
1 answer
938 views

I ran into the following problem: user@machine:/$ echo ./dir/fil | xargs -I {} bash -c "echo $(basename {})" ./dir/fil Why is it not just printing fil? So basename seems to get the expected ...
SebDieBln's user avatar
  • 103
1 vote
1 answer
7k views

I have a json-file with n users. I need to replace the id-field with a different UUID for each user. After that, I need to make n curl calls with the json as payload. How can I achieve this? My json ...
sjoblomj's user avatar
0 votes
2 answers
181 views

I want to find all of the files in git that have some extensions. The list of extensions is generated from my .editorconfig file. Say I have a list of file extensions such as: .css .html .java .js (...
User1648374637563's user avatar
0 votes
1 answer
733 views

root@home:~$ ls root@home:~$ echo abc > z1 root@home:~$ echo xyz > z2 root@home:~$ ls z1 z2 root@home:~$ ls | xargs -I{} cat {} abc xyz root@home:~$ echo z1 z2 | xargs -I{} cat {} cat: 'z1 z2': ...
xmllmx's user avatar
  • 444
0 votes
1 answer
467 views

I have a shell script (I use GNU bash 4.4.20 on Ubuntu 18.04) with a list of commands I often run, e.g.: sudo program1 $1 foo arg1 sudo program2 $1 foo arg2 sudo program1 $1 bar arg3 sudo program2 $1 ...
nonagon's user avatar
  • 593
1 vote
2 answers
214 views

Is there a generalized bash function available that mimics chmod in every aspect, except that it also let's me differentiate between files and directories? I know there's already numerous examples ...
Decent Dabbler's user avatar
2 votes
1 answer
1k views

I need to delete some keys in my redis cluster which can only be accessed from a jump machine deployed in the kubernetes cluster. So if I know the key I can delete it by the following command without ...
Jeff Tian's user avatar
  • 257
0 votes
1 answer
359 views

I'm trying to turn this output: ❯ hg branches -T'{node} {branch}\n' 4b0826975cb29da26a6dd13f463241463c43c6a7 maria 5c31751cdb774f8b6337b6f64232b15903530997 default Into these commands: hg bookmark -r ...
mpen's user avatar
  • 12.5k

15 30 50 per page
1
2 3 4 5
13