Friday, 6 Mar 2026
Subscribe
logo
  • Global
  • AI
  • Cloud Computing
  • Edge Computing
  • Security
  • Investment
  • Sustainability
  • More
    • Colocation
    • Quantum Computing
    • Regulation & Policy
    • Infrastructure
    • Power & Cooling
    • Design
    • Innovations
    • Blog
Font ResizerAa
Data Center NewsData Center News
Search
  • Global
  • AI
  • Cloud Computing
  • Edge Computing
  • Security
  • Investment
  • Sustainability
  • More
    • Colocation
    • Quantum Computing
    • Regulation & Policy
    • Infrastructure
    • Power & Cooling
    • Design
    • Innovations
    • Blog
Have an existing account? Sign In
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Data Center News > Blog > Global Market > Lesser-known xargs command is a versatile time saver
Global Market

Lesser-known xargs command is a versatile time saver

Last updated: October 12, 2024 4:49 pm
Published October 12, 2024
Share
shutterstock 435558448 old clocks on brick wall time, time change, timeless
SHARE

$ discover . -name '*.c' | xargs grep 'stdio.h'
./libcaca-0.99.beta19/src/aafire.c:# embody
./libcaca-0.99.beta19/src/aafire.c:#embody
./libcaca-0.99.beta19/src/cacaclock.c:# embody
./libcaca-0.99.beta19/src/cacaserver.c:#embody
./libcaca-0.99.beta19/src/cacademo.c:# embody
./libcaca-0.99.beta19/src/cacadraw.c:# embody

These are all pretty frequent makes use of of xargs. On the identical time, xargs has many different makes use of that make it significantly extra versatile. Let’s take a more in-depth have a look at the way it works and what it could actually do.

First, the xarg command’s fundamental operate is fairly easy. It echoes what you toss at it. In a way, it’s not very totally different from echo, besides that content material must be redirected to it, not offered as an argument.

$ echo a b c
a b c
$ echo a b c | xargs
a b c

Clearly, nothing is gained within the instance above. The pipe and the usage of xargs are simply making the command extra complicated and a bit extra time-consuming. However the command does illustrate how xargs takes every string that’s handed to it and repeats it.

Within the instance under, we simply sort xargs after which hit enter. Then we sort some textual content. I typed control-d after the textual content and urgent the enter key. You received’t see the control-d (^d), after all, however I included it under to indicate the place it was entered. The xargs command shows the textual content once more. You might enter as many strains of textual content as you cared to and all can be repeated after the control-d.

$ xargs
Hi there, World!
Goodbye for now.
^dHello, World! Goodbye for now.

Similarly, if it’s worthwhile to have the contents of a easy file present up on a single line, mainly flattening the file, xargs will comply along with your needs.

See also  Intel taps semiconductor veteran Lip-Bu Tan as new CEO

First, the file:

Source link

TAGGED: command, LesserKnown, saver, time, Versatile, xargs
Share This Article
Twitter Email Copy Link Print
Previous Article Pyramid Flow open source AI video generator launches Pyramid Flow open source AI video generator launches
Next Article A picture of the Deebot X2 Omni. Hackers took over robovacs to chase pets and yell slurs
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Your Trusted Source for Accurate and Timely Updates!

Our commitment to accuracy, impartiality, and delivering breaking news as it happens has earned us the trust of a vast audience. Stay ahead with real-time updates on the latest events, trends.
FacebookLike
TwitterFollow
InstagramFollow
YoutubeSubscribe
LinkedInFollow
MediumFollow
- Advertisement -
Ad image

Popular Posts

ElevenLabs adds AI voice of celebs to new digital narrator — but is it safe?

Don’t miss OpenAI, Chevron, Nvidia, Kaiser Permanente, and Capital One leaders solely at VentureBeat Rework…

July 2, 2024

PlantBaby Closes Seed Financing Round

PlantBaby, a Marin, CA-based firm devoted to creating options within the plant-based vitamin area, raised…

February 5, 2025

North Pole Security Raises $4M in Seed Funding

North Pole Security, a NYC-based supplier of an enterprise-grade endpoint safety platform for macOS, raised…

July 30, 2025

Honeywell and LS Electric form global partnership

Honeywell has fashioned a worldwide strategic collaboration with LS ELECTRIC to collectively develop and market…

October 8, 2025

High-definition organic LED microdisplays with reduced electrical crosstalk could enhance VR and AR experiences

Analysis {of electrical} pixel crosstalk in OLEDs with micro-patterned SI-HTL. Credit score: Nature Electronics (2025).…

February 9, 2025

You Might Also Like

Can data centres scale AI without putting water under pressure?
Global Market

Can data centres scale AI without putting water under pressure?

By saad
Cisco building exterior with sign
Global Market

Cisco issues emergency patches for critical firewall vulnerabilities

By saad
Steel joints. Mounting bolted connection of steel beams before welding. Metal construction covered protective gray primer. Close-up.
Global Market

Data center new builds diminish even as demand rises

By saad
Cloud
Global Market

Lack of regulatory action on hyperscaler dominance prompts inquiry chair to quit

By saad
Data Center News
Facebook Twitter Youtube Instagram Linkedin

About US

Data Center News: Stay informed on the pulse of data centers. Latest updates, tech trends, and industry insights—all in one place. Elevate your data infrastructure knowledge.

Top Categories
  • Global Market
  • Infrastructure
  • Innovations
  • Investments
Usefull Links
  • Home
  • Contact
  • Privacy Policy
  • Terms & Conditions

© 2024 – datacenternews.tech – All rights reserved

Welcome Back!

Sign in to your account

Lost your password?
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.
You can revoke your consent any time using the Revoke consent button.