Feed aggregator

How to copy permissions from one file to another on Linux

nixCraft - 14 hours 21 min ago
I need to copy or clone file ownership and permissions from another file on Linux. Is there a bash command line option to clone the user, group ownership and permissions on a file from another file on Linux operating system? Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to copy permissions from one file to another on Linux appeared first on nixCraft. 2024-05-08T22:06:06Z 2024-05-08T22:06:06Z Vivek Gite

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

nixCraft - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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 - 14 hours 21 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

Germany Covers Nearly 56 Percent of 2025 Electricity Use With Renewables

Slashdot.org - 14 hours 57 min ago
Longtime Slashdot reader AmiMoJo shares a report from Clean Energy Wire: Renewable energy sources covered nearly 56 percent of Germany's gross electricity consumption in 2025, according to preliminary figures by energy industry group BDEW and research institute ZSW. Despite a 'historically weak' first quarter of the year for wind power production and a significant drop in hydropower output, the share of renewables grew by 0.7 percentage points compared to the previous year thanks to an increase in installed solar power capacity. Solar power output increased by 18.7 percent over the whole year, while the strong growth in installed capacity from previous years could be sustained, with more than 17 gigawatts (GW) added to the system. With March being the least windy month in Germany since records began in 1950, wind power output, on the other hand, faced a drop of 5.2 percent compared to 2024. However, stronger winds in the second and third quarter compensated for much of the early-year decrease. Onshore turbines with a capacity of 5.2 GW were added to the grid, a marked increase from the 3.3 GW in the previous year. Due to significantly less precipitation this year compared to 2024, hydropower output dropped by nearly one quarter (24.1%), while remaining only a fraction (3.2%) of total renewable power output.

Read more of this story at Slashdot.

Chinese Whistleblower Living In US Is Being Hunted By Beijing With US Tech

Slashdot.org - 17 hours 57 min ago
A former Chinese official who fled to the U.S. says Beijing has used advanced surveillance technology from U.S. companies to track, intimidate, and punish him and his family across borders. ABC News reports: Retired Chinese official Li Chuanliang was recuperating from cancer on a Korean resort island when he got an urgent call: Don't return to China, a friend warned. You're now a fugitive. Days later, a stranger snapped a photo of Li in a cafe. Terrified South Korea would send him back, Li fled, flew to the U.S. on a tourist visa and applied for asylum. But even there -- in New York, in California, deep in the Texas desert -- the Chinese government continued to hunt him down with the help of surveillance technology. Li's communications were monitored, his assets seized and his movements followed in police databases. More than 40 friends and relatives -- including his pregnant daughter -- were identified and detained, even by tracking down their cab drivers through facial recognition software. Three former associates died in detention, and for months shadowy men Li believed to be Chinese operatives stalked him across continents, interviews and documents seen by The Associated Press show. The Chinese government is using an increasingly powerful tool to cement its power at home and vastly amplify it abroad: Surveillance technology, much of it originating in the U.S., an AP investigation has found. Within China, this technology helped identify and punish almost 900,000 officials last year alone, nearly five times more than in 2012, according to state numbers. Beijing says it is cracking down on corruption, but critics charge that such technology is used in China and elsewhere to stifle dissent and exact retribution on perceived enemies. Outside China, the same technology is being used to threaten wayward officials, along with dissidents and alleged criminals, under what authorities call Operations "Fox Hunt" and "Sky Net." The U.S. has criticized these overseas operations as a "threat" and an "affront to national sovereignty." More than 14,000 people, including some 3,000 officials, have been brought back to China from more than 120 countries through coercion, arrests and pressure on relatives, according to state information.

Read more of this story at Slashdot.

Ukrainians Sue US Chip Firms For Powering Russian Drones, Missiles

Slashdot.org - Fri, 12/12/2025 - 22:30
An anonymous reader quotes a report from Ars Technica: Dozens of Ukrainian civilians filed a series of lawsuits in Texas this week, accusing some of the biggest US chip firms of negligently failing to track chips that evaded export curbs. Those chips were ultimately used to power Russian and Iranian weapon systems, causing wrongful deaths last year. Their complaints alleged that for years, Texas Instruments (TI), AMD, and Intel have ignored public reporting, government warnings, and shareholder pressure to do more to track final destinations of chips and shut down shady distribution channels diverting chips to sanctioned actors in Russia and Iran. Putting profits over human lives, tech firms continued using "high-risk" channels, Ukrainian civilians' legal team alleged in a press statement, without ever strengthening controls. All that intermediaries who placed bulk online orders had to do to satisfy chip firms was check a box confirming that the shipment wouldn't be sent to sanctioned countries, lead attorney Mikal Watts told reporters at a press conference on Wednesday, according to the Kyiv Independent. "There are export lists," Watts said. "We know exactly what requires a license and what doesn't. And companies know who they're selling to. But instead, they rely on a checkbox that says, 'I'm not shipping to Putin.' That's it. No enforcement. No accountability." [...] Damages sought include funeral expenses and medical costs, as well as "exemplary damages" that are "intended to punish especially wrongful conduct and to deter similar conduct in the future." For plaintiffs, the latter is the point of the litigation, which they hope will cut off key supply chains to keep US tech out of weapon systems deployed against innocent civilians. "They want to send a clear message that American companies must take responsibility when their technologies are weaponized and used to commit harm across the globe," the press statement said. "Corporations must be held accountable when its unlawful decisions made in the name of profit directly cause the death of innocents and widespread human suffering." For chip firms, the litigation could get costly if more civilians join, with the threat of a loss potentially forcing changes that could squash supply chains currently working to evade sanctions. "We want to make this process so expensive and painful that companies are forced to act," Watts said. "That is our contribution to stopping the war against civilians."

Read more of this story at Slashdot.

Comment