Feed aggregator

A Bash Script to Read All Command Line Arguments into an Array: Simplify Argument Handling

nixCraft - 10 hours 28 min ago
If you are writing a Bash shell script, you should read command-line arguments into an array for some time. This allows us to process any number of arguments provided when the script is run. This makes the script adaptable to different use cases. Instead of dealing with fixed variables like $1, $2, $3, etc., you can work with any number of arguments more dynamically using bash for loop or bash while loop, depending upon your needs. Arrays make it simple to loop through each argument and perform operations on them, whether basic printing or complex processing. Bash provides a mapfile (readarray command) internal built-in command to read lines from a file into an array variable. Let us see how to use mapfile to read all command line arguments into an array. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post A Bash Script to Read All Command Line Arguments into an Array: Simplify Argument Handling appeared first on nixCraft. 2024-05-07T10:40:08Z 2024-05-07T10:40:08Z Vivek Gite

How to Pin Versions in Yum or Dnf for RHEL or CentOS Linux

nixCraft - 10 hours 28 min ago
CentOS, RHEL (Red Hat Enterprise Linux), Fedora and other clones of RHEL, such as Oracle, Alma, and Rocky, offer support for version pinning. This feature allows developers and system administrators to lock a particular package to a specific version, preventing it from being automatically updated by yum or dnf commands. Sometimes, it is necessary to protect packages from being updated to newer versions to avoid incompatibility issues with your applications. For example, you can lock down PHP version 8.3.6 and avoid using updated PHP version 8.4. Let us see how to lock a package to a specific version, only exclude a package from yum update or dnf update on a CentOS, RHEL, Fedora, and friends. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to Pin Versions in Yum or Dnf for RHEL or CentOS Linux appeared first on nixCraft. 2024-05-07T09:01:47Z 2024-05-07T09:01:47Z Vivek Gite

How to perform find and replace operations within a visual selection in Vim

nixCraft - 10 hours 28 min ago
Here's a quick tip for vim users. You can perform find and replace operations within a visual selection in Vim for text or code block. Visual selection for finding and replacing text in Vim allows developers and Linux/Unix users precise and efficient text editing. It's handy when you want to change specific portions of text or code blocks within a larger file without affecting other occurrences. This method required to minimizing manual search and reducing the risk of unintended code or text modifications. Let us see how to find and replace in Vim visual mode selection. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to perform find and replace operations within a visual selection in Vim appeared first on nixCraft. 2024-05-07T06:14:33Z 2024-05-07T06:14:33Z Vivek Gite

How to find hidden processes and ports on Linux/Unix/Windows

nixCraft - 10 hours 28 min ago
Unhide is a little handy forensic tool to find hidden processes and TCP/UDP ports by rootkits / LKMs or by another hidden technique. This tool works under Linux, Unix-like system, and MS-Windows operating systems. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to find hidden processes and ports on Linux/Unix/Windows appeared first on nixCraft. 2024-05-07T05:05:51Z 2024-05-07T05:05:51Z Vivek Gite

How to add bash auto completion in Debian Linux

nixCraft - 10 hours 28 min ago
Bash is a command language interpreter compatible with sh. It can execute commands read from a file or keyboard. On Debian Linux, bash-completion is a set of shell functions that uses Bash's programmable completion feature. This page provides instructions on installing and enabling Bash auto-completion on Debian Linux versions 10, 11, and 12 to increase productivity by writing custom bash code. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to add bash auto completion in Debian Linux appeared first on nixCraft. 2024-05-06T15:51:25Z 2024-05-06T15:51:25Z Vivek Gite

How to add cron job entry for acme.sh

nixCraft - 10 hours 28 min ago
Recently, I had a learning experience with cron jobs and acme.sh. acme.sh is an excellent tool that simplifies the management of Let's Encrypt TLS (SSL) certificates. It makes obtaining and renewing these essential security certificates for your web server easier. Recently, I moved my server from Linode to AWS, which was a new environment for me. Initially, everything appeared to be working correctly, and I assumed everything was running smoothly. However, I forgot to migrate the cron job that acme.sh uses to renew the certificate automatically. This oversight caused my Let's Encrypt certificates to expire, resulting in security warnings and potential disruptions for visitors to my website. Opps! Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to add cron job entry for acme.sh appeared first on nixCraft. 2024-05-03T06:43:12Z 2024-05-03T06:43:12Z Vivek Gite

How to Upgrade Ubuntu 22.04 to 24.04 LTS: A Complete Guide

nixCraft - 10 hours 28 min ago
{nixCraft Patreon supporters content}Below is a sneak peek of this content! Ubuntu 24.04 LTS (Noble Numbat) was launched on April 25th, 2024. This new version will be supported for five years until June 2029. The armhf architecture now provides support for the Year 2038 problem. The upgrades include significant updates to core packages like Linux kernel, systemd, Netplan, […]The post How to Upgrade Ubuntu 22.04 to 24.04 LTS: A Complete Guide appeared first on Opensource Flare✨. 2024-04-26T18:25:08Z 2024-04-26T18:25:08Z Vivek Gite

How to Upgrade Ubuntu 22.04 to 24.04 LTS: A Complete Guide

nixCraft - 10 hours 28 min ago
Ubuntu 24.04 LTS (Noble Numbat) was launched on April 25th, 2024. This new version will be supported for five years until June 2029. The armhf architecture now provides support for the Year 2038 problem. The upgrades include significant updates to core packages like Linux kernel, systemd, Netplan, toolchain upgrades for better development support, enhanced security measures, and performance optimizations. It also has an updated GNOME desktop environment and other default applications. Let us see how to upgrade Ubuntu 22.04 LTS to Ubuntu 24.04 LTS using the CLI over ssh-based session. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to Upgrade Ubuntu 22.04 to 24.04 LTS: A Complete Guide appeared first on nixCraft. 2024-04-26T08:33:21Z 2024-04-26T08:33:21Z Vivek Gite

How to configure AWS SES with Postfix MTA on Debian Linux

nixCraft - 10 hours 28 min ago
AWS SES (Amazon Simple Email Service) is a cloud-based email-sending service that is both reliable and cost-effective. This service is offered by Amazon Web Services. Postfix is a popular email server for Debian and Unix-like systems. It is an open-source Mail Transfer Agent (MTA) responsible for routing and delivering emails. Debian Linux is a widely used Linux distribution known for its stability and user-friendliness for server usage. Let us see how to integrate AWS SES with the Postfix MTA on Debian Linux version 11/12. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to configure AWS SES with Postfix MTA on Debian Linux appeared first on nixCraft. 2024-04-19T07:04:06Z 2024-04-19T07:04:06Z Vivek Gite

The repository ‘http://deb.debian.org/debian buster-backports Release’ no longer has a Release file.

nixCraft - 10 hours 28 min ago
When you run the sudo apt update, you may see the following message or error on a Debian Linux: Err:5 http://deb.debian.org/debian buster-backports Release 404 Not Found [IP: 146.75.34.132 80] Reading package lists... Done E: The repository 'http://deb.debian.org/debian buster-backports Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Here is how to fix this issue. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post The repository ‘http://deb.debian.org/debian buster-backports Release’ no longer has a Release file. appeared first on nixCraft. 2024-04-14T20:42:01Z 2024-04-14T20:42:01Z Vivek Gite

How do I find out my timezone in Linux?

nixCraft - 10 hours 28 min ago
You can find the timezone in Linux using the command line. The easiest way to do this is to type the "timedatectl" command and look for the "timezone" line when using modern Linux distros with systemd. There are other commands and ways to temporarily switch to a new timezone for date calculations. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How do I find out my timezone in Linux? appeared first on nixCraft. 2024-04-06T01:06:44Z 2024-04-06T01:06:44Z Vivek Gite

NASA Will Soon Find Out If the Perseverance Rover Can Really Persevere On Mars

Slashdot.org - 11 hours 4 min ago
With NASA's Mars Sample Return mission delayed into the 2030s, engineers are certifying the Perseverance rover to keep operating for many more years while it continues collecting and safeguarding Martian rock samples. Ars Technica reports: The good news is that the robot, about the size of a small SUV, is in excellent health, according to Steve Lee, Perseverance's deputy project manager at NASA's Jet Propulsion Laboratory (JPL). "Perseverance is approaching five years of exploration on Mars," Lee said in a press briefing Wednesday at the American Geophysical Union's annual fall meeting. "Perseverance is really in excellent shape. All the systems onboard are operational and performing very, very well. All the redundant systems onboard are available still, and the rover is capable of supporting this mission for many, many years to come." The rover's operators at JPL are counting on sustaining Perseverance's good health. The rover's six wheels have carried it a distance of about 25 miles, or 40 kilometers, since landing inside the 28-mile-wide (45-kilometer) Jezero Crater in February 2021. That is double the original certification for the rover's mobility system and farther than any vehicle has traveled on the surface of another world. Now, engineers are asking Perseverance to perform well beyond expectations. An evaluation of the rover's health concluded it can operate until at least 2031. The rover uses a radioactive plutonium power source, so it's not in danger of running out of electricity or fuel any time soon. The Curiosity rover, which uses a similar design, has surpassed 13 years of operations on Mars. There are two systems that are most likely to limit the rover's useful lifetime. One is the robotic arm, which is necessary to collect samples, and the other is the rover's six wheels and the drive train that powers them. "To make sure we can continue operations and continue driving for a long, long way, up to 100 kilometers (62 miles), we are doing some additional testing," Lee said. "We've successfully completed a rotary actuator life test that has now certified the rotary system to 100 kilometers for driving, and we have similar testing going on for the brakes. That is going well, and we should finish those early part of next year."

Read more of this story at Slashdot.

Nuclear Developer Proposes Using Navy Reactors For Data Centers

Slashdot.org - Wed, 12/24/2025 - 22:30
An anonymous reader quotes a report from the Financial Post: A Texas power developer is proposing to repurpose nuclear reactors from Navy warships to power the United States grid as the Trump administration pushes to secure massive amounts of energy for the artificial intelligence boom. HGP Intelligent Energy LLC filed an application to the Energy Department to redirect two retired reactors to a data center project proposed at Oak Ridge, Tennessee, according to a letter submitted to the agency's Office of Energy Dominance Financing. The project, filed for the White House's Genesis Mission, would produce about 450-520 megawatts of around-the-clock electricity, or enough to power roughly 360,000 homes. The proposal would rewire reactors from naval vessels, originally built by Westinghouse Electric Company and General Electric, at a fraction of the cost of new builds. According to the report, The developer expects to seek a loan guarantee from the U.S. Department of Energy and raise roughly $1.8-$2.1 billion in private capital to prepare the reactors for civilian use, targeting initial completion by 2029. The approach is technically feasible but would break new ground by adapting military nuclear assets for the commercial grid. Bloomberg first reported the story.

Read more of this story at Slashdot.

'Why I Quit Streaming And Got Back Into Cassettes'

Slashdot.org - Wed, 12/24/2025 - 20:25
"In the age of Spotify and AI slop, tapes remind us what we're missing when we stop taking risks," writes author Janus Rose in an article for 404 Media. Here's an excerpt: There are lots of advantages to the cassette lifestyle. Unlike vinyl records, tapes are compact and super-portable, and unlike streaming, you never have to worry about a giant company suddenly taking them away from you. They can be easily duplicated, shared, and made into mixtapes using equipment you find in a junk shop. When I was a kid, the first music I ever owned were tapes I recorded from MTV with a Kids' Fisher Price tape recorder. I had no money, so I would listen to those tapes for hours, relishing every word Kim Gordon exhaled on my bootlegged copy of Sonic Youth's "Bull in the Heather." Just like back then, my rediscovery of cassettes has led me to start listening more intentionally and deeply, devoting more and more time to each record without the compulsion to hit "skip." Most of the cassettes I bought in Tokyo had music I probably never would have found or spent time with otherwise. Getting reacquainted with tapes made me realize how much has been lost in the streaming era. Over the past two decades, platforms like Spotify co-opted the model of peer-to-peer filesharing pioneered by Napster and BitTorrent into a fully captured ecosystem. But instead of sharing, this ecosystem was designed around screen addiction, surveillance, and instant gratification -- with corporate middlemen and big labels reaping all the profits. Streaming seeks to virtually eliminate what techies like to call "user friction," turning all creative works into a seamless and unlimited flow of data, pouring out of our devices like water from a digital faucet. Everything becomes "Content," flattened into aesthetic buckets and laser-targeted by "perfect fit" algorithms to feed our addictive impulses. Thus the act of listening to music is transformed from a practice of discovery and communication to a hyper-personalized mood board of machine-optimized "vibes." What we now call "AI Slop" is just a novel and more cynically efficient vessel for this same process. Slop removes human beings as both author and subject, reducing us to raw impulses -- a digital lubricant for maximizing viral throughput. Whether we love or hate AI Slop is irrelevant, because human consumers are not its intended beneficiaries. In the minds of CEOs like OpenAI's Sam Altman, we're simply components in a machine built to maintain and accelerate information flows, in order to create value for an insatiably wealthy investor class. [...] Tapes and other physical media aren't a magic miracle cure for late-stage capitalism. But they can help us slow down and remember what makes us human. Tapes make music-listening into an intentional practice that encourages us to spend time connecting with the art, instead of frantically vibe-surfing for something that suits our mood from moment-to-moment. They reject the idea that the point of discovering and listening to music is finding the optimal collection of stimuli to produce good brain chemicals. More importantly, physical media reminds us that nothing good is possible if we refuse to take risks. You might find the most mediocre indie band imaginable. Or you might discover something that changes you forever. Nothing will happen if you play it safe and outsource all of your experiences to a content machine designed to make rich people richer.

Read more of this story at Slashdot.

Apple To Allow Alternative App Stores For iOS Users In Brazil

Slashdot.org - Wed, 12/24/2025 - 19:45
Apple will allow alternative iOS app stores and external payment systems in Brazil after settling an antitrust case with the country's competition authority, following a lawsuit brought by MercadoLibre back in 2022. Thurrott reports: Yesterday, Brazil's Conselho Administrativo de Defesa Economica (CADE) explained in its press release that it has approved a Term of Commitment to Cease (TCC) submitted by Apple. To settle the lawsuit, the iPhone maker has agreed to allow third-party iOS app stores in Brazil and to let developers use external payment systems. The company will also use neutral wording in the warning messages about third-party app stores and external payment systems that iOS users in Brazil will see. As part of the settlement, Apple has 105 days to implement these changes to avoid a fine of up to $27.1 million. A separate report from Brazilian blog Tecnoblog revealed that Apple will still take a 5% "Core Technology Commission" fee on transactions going through alternative app stores. Additionally, the company will take a 15% cut on in-app purchases for App Store apps when developers redirect users to their own payment systems.

Read more of this story at Slashdot.

Apple's App Course Runs $20,000 a Student. Is It Really Worth It?

Slashdot.org - Wed, 12/24/2025 - 19:02
An anonymous reader quotes a report from Wired: Two years ago, Lizmary Fernandez took a detour from studying to be an immigration attorney to join a free Apple course for making iPhone apps. The Apple Developer Academy in Detroit launched as part of the company's $200 million response to the Black Lives Matter protests and aims to expand opportunities for people of color in the country's poorest big city. But Fernandez found the program's cost-of-living stipend lacking -- "A lot of us got on food stamps," she says -- and the coursework insufficient for landing a coding job. "I didn't have the experience or portfolio," says the 25-year-old, who is now a flight attendant and preparing to apply to law school. "Coding is not something I got back to." Since 2021, the academy has welcomed over 1,700 students, a racially diverse mix with varying levels of tech literacy and financial flexibility. About 600 students, including Fernandez, have completed its 10-month course of half-days at Michigan State University, which cosponsors the Apple-branded and Apple-focused program. WIRED reviewed contracts and budgets and spoke with officials and graduates for the first in-depth examination of the nearly $30 million invested in the academy over the past four years -- almost 30 percent of which came from Michigan taxpayers and the university's regular students. As tech giants begin pouring billions of dollars into AI-related job training courses across the country, the Apple academy offers lessons on the challenges of uplifting diverse communities. [...] The program gives out iPhones and MacBooks and spends an estimated $20,000 per student, nearly twice as much as state and local governments budget for community colleges. [...] About 70 percent of students graduate, which [Sarah Gretter, the academy leader for Michigan State] describes as higher than typical for adult education. She says the goal is for them to take "a next step," whether a job or more courses. Roughly a third of participants are under 25, and virtually all of them pursue further schooling. [...] About 71 percent of graduates from the last two years went onto full-time jobs across a variety of industries, according to academy officials. Amy J. Ko, a University of Washington computer scientist who researches computing education, calls under 80 percent typical for the coding schools she has studied but notes that one of her department's own undergraduate programs has a 95 percent job placement rate.

Read more of this story at Slashdot.

The Phone-Based Retirement Is Here

Slashdot.org - Wed, 12/24/2025 - 18:20
Adult children across the United States are increasingly reporting that their aging parents have developed what looks remarkably like the smartphone addiction [non-paywalled source] typically associated with teenagers, a phenomenon The Atlantic's Charlie Warzel has dubbed "phone-based retirement." A 2019 Pew Research Center study found people 60 and older spend more than half their daily leisure time -- four hours and 16 minutes -- in front of screens. Nielsen reported this year that adults 65 and up watch YouTube on their TVs nearly twice as much as they did two years ago. 40% of adults aged 59 to 77 reported feeling anxious without device access in a 2,000-person survey. Ipsit Vahia, chief of geriatric psychiatry at Mass General Brigham's McLean Hospital, cautioned against treating all older adults as a monolithic group. The COVID-19 pandemic drove significant tech adoption among seniors as Zoom became essential for family gatherings, church services, and telehealth. Some research suggests device use may be linked to better cognitive function for people over 50, and Vahia noted that technology use in older adults appears to protect them from isolation and loneliness -- the opposite of its effect on teenagers.

Read more of this story at Slashdot.

Spotify Disables Accounts After Open-Source Group Scrapes 86 Million Songs From Platform

Slashdot.org - Wed, 12/24/2025 - 17:40
After Anna's Archive published a massive scrape containing 86 million songs and metadata from Spotify, the streaming giant responded by disabling the nefarious accounts responsible. A spokesperson for Spotify told Recorded Future News that it "has identified and disabled the nefarious user accounts that engaged in unlawful scraping." "We've implemented new safeguards for these types of anti-copyright attacks and are actively monitoring for suspicious behavior," the spokesperson said. "Since day one, we have stood with the artist community against piracy, and we are actively working with our industry partners to protect creators and defend their rights." The Record reports: The spokesperson added that Anna's Archive did not contact them before publishing the files. They also said it did not consider the incident a "hack" of Spotify. The people behind the leaked database systematically violated Spotify's terms by stream-ripping some of the music from the platform over a period of months, a spokesperson said. They did this through user accounts set up by a third party and not by accessing Spotify's business systems, they added. Anna's Archive published a blog post about the cache this weekend, writing that while it typically focuses its efforts on text, its mission to preserve humanity's knowledge and culture "doesn't distinguish among media types." "Sometimes an opportunity comes along outside of text. This is such a case. A while ago, we discovered a way to scrape Spotify at scale. We saw a role for us here to build a music archive primarily aimed at preservation," they said. "This Spotify scrape is our humble attempt to start such a 'preservation archive' for music. Of course Spotify doesn't have all the music in the world, but it's a great start."

Read more of this story at Slashdot.

Comment