Friday, 27 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  WSO2 CEO Keynote: It’s Time to Go Platformless

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

Premio secures triple ‘Best in Show’ honors for rugged edge innovation

Rugged edge and embedded computing supplier Premio received three “Finest in Present” awards at Embedded…

October 30, 2024

MSP Global – HostingJournalist.com

MSP GLOBAL is a vital occasion for Managed Service Suppliers (MSPs) seeking to thrive in…

October 4, 2024

Hyper-Distributed AI demands an ‘Offramp to edge’ – here’s why

By Sukruth Srikantha, VP of Options Structure at Alkira For a decade, the north star…

December 17, 2025

Sage Raises $35M in Series B Funding

Sage, a NYC-based supplier of an operations administration platform for senior residing, raised $35M in…

December 9, 2024

Spectro Cloud secures $75M series C to drive Kubernetes innovation at the edge

Spectro Cloud raised $75 million in a Sequence C funding spherical led by Goldman Sachs…

November 28, 2024

You Might Also Like

AI services
Global Market

Data center poaching adds to staffing crisis

By saad
It’s time to separate fact from fiction on data centre energy demand
Global Market

It’s time to separate fact from fiction on data centre energy demand

By saad
3D Rendering of digital binary data on microchip with glow circuit board background. Concept of for deep machine learning, crypto currency, hi tech product uses. Big data visualization, cpu processing
Global Market

Arm shifts course, moves into silicon business

By saad
LINX completes LON2 network refresh with Nokia
Global Market

LINX completes LON2 network refresh with Nokia

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.