[-] root@lemmy.run 2 points 1 year ago

Nice initiative.

[-] root@lemmy.run 8 points 1 year ago

Yea, I have submitted multiple abuse emails with details to domain registrars for scamming and phishing.

Didn’t receive any update from them on any action taken yet.

1
submitted 1 year ago by root@lemmy.run to c/linuxadmin@lemmy.run

In this tutorial, we will explore how to use sed (stream editor) with examples in the Markdown language. sed is a powerful command-line tool for text manipulation and is widely used for tasks such as search and replace, line filtering, and text transformations. What is described below barely scratches the surface what sed can do.

Table of Contents

  1. Installing Sed
  2. Basic Usage
  3. Search and Replace
  4. Deleting Lines
  5. Inserting and Appending Text
  6. Transformations
  7. Working with Files
  8. Conclusion

1. Installing Sed

Before we begin, make sure sed is installed on your system. It usually comes pre-installed on Unix-like systems (e.g., Linux, macOS). To check if sed is installed, open your terminal and run the following command:

sed --version

If sed is not installed, you can install it using your package manager. For example, on Ubuntu or Debian-based systems, you can use the following command:

sudo apt-get install sed

2. Basic Usage

To use sed, you need to provide it with a command and the input text to process. The basic syntax is as follows:

sed 'command' input.txt

Here, 'command' represents the action you want to perform on the input text. It can be a search pattern, a substitution, or a transformation. input.txt is the file containing the text to process. If you omit the file name, sed will read from the standard input.

3. Search and Replace

One of the most common tasks with sed is search and replace. To substitute a pattern with another in Markdown files, use the s command. The basic syntax is:

sed 's/pattern/replacement/' input.md

For example, to replace all occurrences of the word "apple" with "orange" in input.md, use the following command:

sed 's/apple/orange/' input.md

4. Deleting Lines

You can also delete specific lines from a Markdown file using sed. The d command is used to delete lines that match a particular pattern. The syntax is as follows:

sed '/pattern/d' input.md

For example, to delete all lines containing the word "banana" from input.md, use the following command:

sed '/banana/d' input.md

5. Inserting and Appending Text

sed allows you to insert or append text at specific locations in a Markdown file. The i command is used to insert text before a line, and the a command is used to append text after a line. The syntax is as follows:

sed '/pattern/i\inserted text' input.md
sed '/pattern/a\appended text' input.md

For example, to insert the line "This is a new paragraph." before the line containing the word "example" in input.md, use the following command:

sed '/example/i\This is a new paragraph.' input.md

6. Transformations

sed provides various transformation commands that can be used to modify Markdown files. Some useful commands include:

  • y: Transliterate characters. For example, to convert all uppercase letters to lowercase, use:

    sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' input.md
    
  • p: Print lines. By default, sed only prints the modified lines. To print all lines, use:

    sed -n 'p' input.md
    
  • r: Read and insert the contents of a file. For example, to insert the contents of insert.md after the line containing the word "insertion point" in input.md, use:

    sed '/insertion point/r insert.md' input.md
    

These are just a few examples of the transformation commands available in sed.

7. Working with Files

By default, sed modifies the input in-place. To make changes to a file and save the output to a new file, you can use input/output redirection:

sed 'command' input.md > output.md

This command runs sed on input.md and saves the output to output.md. Be cautious when using redirection, as it will overwrite the contents of output.md if it already exists.

8. Conclusion

In this tutorial, we have explored the basics of using sed with Markdown files. You have learned how to perform search and replace operations, delete lines, insert and append text, apply transformations, and work with files. sed offers a wide range of capabilities, and with practice, you can become proficient in manipulating Markdown files using this powerful tool.

0
submitted 1 year ago by root@lemmy.run to c/geopolitics@lemmy.run

cross-posted from: https://lemmy.run/post/19256

The bridge collapsed overnight near Columbus, Montana causing several train cars to be immersed in the Yellowstone River.

Portions of a freight train plunged into the Yellowstone River due to bridge collapse. (Image: AP)

A bridge that crosses the Yellowstone River in Montana collapsed early Saturday, plunging portions of a freight train carrying hazardous materials into the rushing water below.

The train cars were carrying hot asphalt and molten sulfur, Stillwater County Disaster and Emergency Services said. Officials shut down drinking water intakes downstream while they evaluated the danger after the 6 a.m. accident. An Associated Press reporter witnessed a yellow substance coming out of some of the tank cars.

David Stamey, the county’s chief of emergency services, said there was no immediate danger for the crews working at the site, and the hazardous material was being diluted by the swollen river. There were three asphalt cars and four sulfur cars in the river.

The train crew was safe and no injuries were reported, Montana Rail Link spokesman Andy Garland said in a statement. The asphalt and sulfur both solidify quickly when exposed to cooler temperatures, he said.

Railroad crews were at the scene in Stillwater County, near the town of Columbus, about 40 miles (about 64 kilometers) west of Billings. The area is in a sparsely populated section of the Yellowstone River Valley, surrounded by ranch and farmland. The river there flows away from Yellowstone National Park, which is about 110 miles (177 kilometers) southwest.

“We are committed to addressing any potential impacts to the area as a result of this incident and working to understand the reasons behind the accident,” Garland said.

The bridge collapse also took out a fiber-optic cable providing internet service to many customers in the state, the high-speed provider Global Net said. “This is the major fiber route ... through Montana,” a recording on the company’s phone line said Saturday. “This is affecting all Global Net customers. Connectivity will either be down or extremely slow.”

In neighboring Yellowstone County, officials said they instituted emergency measures at water treatment plants due to the “potential hazmat spill” and asked residents to conserve water.

The cause of the collapse is under investigation. The river was swollen with recent heavy rains, but it’s unclear whether that was a factor. The Yellowstone saw record flooding in 2022 that caused extensive damage to Yellowstone National Park and adjacent towns in Montana. Robert Bea, a retired engineering professor at the University of California Berkeley who has analyzed the causes of hundreds of major disasters, said repeated years of heavy river flows provided a clue to the possible cause.

“The high water flow translates to high forces acting directly on the pier and, importantly, on the river bottom,” Bea said. “You can have erosion or scour that removes support from the foundation. High forces translate to a high likelihood of a structural or foundation failure that could act as a trigger to initiate the accident.”

An old highway bridge that paralleled the railroad bridge — together, they were called the Twin Bridges — was removed in 2021 after the Montana Department of Transportation determined it was in imminent danger of falling. It wasn’t immediately clear when the railroad bridge was constructed or when it was last inspected. Bea said investigators would also want to look at whether there was wear or rust in bridge components as well as a record of maintenance, repair and inspections.

Federal Railroad Administration officials were at the scene working with local authorities. “As part of our investigation, we have requested and will thoroughly review a copy of recent bridge inspection reports from the owner for compliance with federal Bridge Safety Standards,” the agency said in a statement Saturday, noting that responsibility for inspections lies with bridge owners.

Kelly Hitchcock of the Columbus Water Users shut off the flow of river water into an irrigation ditch downstream from the collapsed bridge to prevent contents from the tank cars from reaching nearby farmland. The Stillwater County Sheriff’s Office called the group Saturday morning to warn it about the collapse, Hitchcock said.

The U.S. Environmental Protection Agency notes that sulfur is a common element used as a fertilizer as well as an insecticide, fungicide and rodenticide.

0
submitted 1 year ago by root@lemmy.run to c/geopolitics@lemmy.run

Author: Astha Singh

Biden reiterated that the friendship between America and India is among the most consequential among partnerships and has now turned out to be stronger.

President Biden asserted that US-India friendship among most consequential in the world | Image: AP/PTI

After Prime Minister Narendra Modi's US visit, President Joe Biden on Sunday reiterated that the friendship between America and India is among the most consequential partnerships globally and has now turned out to be stronger and more dynamic than ever. Responding to the US President, Prime Minister Modi affirmed the power of friendship between the two nations. In PM Modi's historic three-day State visit, India and America signed several major deals to boost cooperation in key areas such as defence, space, and trade with an aim to further elevate their partnership.

Biden says 'US-India friendship most consequential'

President Biden took to Twitter and shared a video showcasing glimpses of Prime Minister Narendra Modi's State visit. "The friendship between the United States and India is among the most consequential in the world. And it's stronger, closer, and more dynamic than ever," he wrote.

In the video, the US President stated that he has long believed that ties between India and US will be one of the defining relationships as both nations' Constitutions are bound with the same phrase: "We the people". He added that both nations share democratic values and want people everywhere to have the opportunity to live in dignity. "This is a cornerstone of this essential partnership between India and the US. And that is why I know the friendship between our nations is only going to grow as we face the future together," he said.

In response to Biden's tweet, PM Modi asserted that the friendship between India and the US is a force for global good and will make the planet better as well as more sustainable. "I fully agree with you, POTUS, Joe Biden. The friendship between our countries is a force for global good. It will make the planet better and more sustainable. The ground covered in my recent visit will strengthen our bond even more," tweeted PM Modi.

I fully agree with you, @POTUS @JoeBiden! Friendship between our countries is a force of global good. It will make a planet better and more sustainable. The ground covered in my recent visit will strengthen our bond even more. 🇮🇳 🇺🇸 https://t.co/iEEhBIYG17 - Narendra Modi (@narendramodi) June 25, 2023

PM Modi embarked on his visit to the US on June 20 and in New York, he led a historic event at the UN Headquarters to commemorate the ninth International Day of Yoga on June 21. A day later, he received a red-carpet welcome at the White House by President Biden in Washington DC. The two leaders held a historic summit on Thursday, followed by Modi's address to the US Congress and a State dinner hosted at the White House by the Bidens in his honour.

1
submitted 1 year ago by root@lemmy.run to c/linux@programming.dev

cross-posted from: https://lemmy.run/post/19113

In this tutorial, we will walk through the process of using the grep command to filter Nginx logs based on a given time range. grep is a powerful command-line tool for searching and filtering text patterns in files.

Step 1: Access the Nginx Log Files First, access the server or machine where Nginx is running. Locate the log files that you want to search. Typically, Nginx log files are located in the /var/log/nginx/ directory. The main log file is usually named access.log. You may have additional log files for different purposes, such as error logging.

Step 2: Understanding Nginx Log Format To effectively search through Nginx logs, it is essential to understand the log format. By default, Nginx uses the combined log format, which consists of several fields, including the timestamp. The timestamp format varies depending on your Nginx configuration but is usually in the following format: [day/month/year:hour:minute:second timezone].

Step 3: Determine the Time Range Decide on the time range you want to filter. You will need to provide the starting and ending timestamps in the log format mentioned earlier. For example, if you want to filter logs between June 24th, 2023, from 10:00 AM to 12:00 PM, the time range would be [24/Jun/2023:10:00:00 and [24/Jun/2023:12:00:00.

Step 4: Use Grep to Filter Logs With the log files and time range identified, you can now use grep to filter the logs. Open a terminal or SSH session to the server and execute the following command:

grep "\[24/Jun/2023:10:00:" /var/log/nginx/access.log | awk '$4 >= "[24/Jun/2023:10:00:" && $4 <= "[24/Jun/2023:12:00:"'

Replace starting_timestamp and ending_timestamp with the appropriate timestamps you determined in Step 3. The grep command searches for lines containing the starting timestamp in the log file specified (access.log in this example). The output is then piped (|) to awk, which filters the logs based on the time range.

Step 5: View Filtered Logs After executing the command, you should see the filtered logs that fall within the specified time range. The output will include the entire log lines matching the filter.

Additional Tips:

  • If you have multiple log files, you can either specify them individually in the grep command or use a wildcard character (*) to match all files in the directory.
  • You can redirect the filtered output to a file by appending > output.log at the end of the command. This will create a file named output.log containing the filtered logs.

That's it! You have successfully filtered Nginx logs using grep based on a given time range. Feel free to explore additional options and features of grep to further refine your log analysis.

1
submitted 1 year ago by root@lemmy.run to c/linux@lemmy.ml

cross-posted from: https://lemmy.run/post/19113

In this tutorial, we will walk through the process of using the grep command to filter Nginx logs based on a given time range. grep is a powerful command-line tool for searching and filtering text patterns in files.

Step 1: Access the Nginx Log Files First, access the server or machine where Nginx is running. Locate the log files that you want to search. Typically, Nginx log files are located in the /var/log/nginx/ directory. The main log file is usually named access.log. You may have additional log files for different purposes, such as error logging.

Step 2: Understanding Nginx Log Format To effectively search through Nginx logs, it is essential to understand the log format. By default, Nginx uses the combined log format, which consists of several fields, including the timestamp. The timestamp format varies depending on your Nginx configuration but is usually in the following format: [day/month/year:hour:minute:second timezone].

Step 3: Determine the Time Range Decide on the time range you want to filter. You will need to provide the starting and ending timestamps in the log format mentioned earlier. For example, if you want to filter logs between June 24th, 2023, from 10:00 AM to 12:00 PM, the time range would be [24/Jun/2023:10:00:00 and [24/Jun/2023:12:00:00.

Step 4: Use Grep to Filter Logs With the log files and time range identified, you can now use grep to filter the logs. Open a terminal or SSH session to the server and execute the following command:

grep "\[24/Jun/2023:10:00:" /var/log/nginx/access.log | awk '$4 >= "[24/Jun/2023:10:00:" && $4 <= "[24/Jun/2023:12:00:"'

Replace starting_timestamp and ending_timestamp with the appropriate timestamps you determined in Step 3. The grep command searches for lines containing the starting timestamp in the log file specified (access.log in this example). The output is then piped (|) to awk, which filters the logs based on the time range.

Step 5: View Filtered Logs After executing the command, you should see the filtered logs that fall within the specified time range. The output will include the entire log lines matching the filter.

Additional Tips:

  • If you have multiple log files, you can either specify them individually in the grep command or use a wildcard character (*) to match all files in the directory.
  • You can redirect the filtered output to a file by appending > output.log at the end of the command. This will create a file named output.log containing the filtered logs.

That's it! You have successfully filtered Nginx logs using grep based on a given time range. Feel free to explore additional options and features of grep to further refine your log analysis.

1
submitted 1 year ago* (last edited 1 year ago) by root@lemmy.run to c/linuxadmin@lemmy.run

In this tutorial, we will walk through the process of using the grep command to filter Nginx logs based on a given time range. grep is a powerful command-line tool for searching and filtering text patterns in files.

Step 1: Access the Nginx Log Files First, access the server or machine where Nginx is running. Locate the log files that you want to search. Typically, Nginx log files are located in the /var/log/nginx/ directory. The main log file is usually named access.log. You may have additional log files for different purposes, such as error logging.

Step 2: Understanding Nginx Log Format To effectively search through Nginx logs, it is essential to understand the log format. By default, Nginx uses the combined log format, which consists of several fields, including the timestamp. The timestamp format varies depending on your Nginx configuration but is usually in the following format: [day/month/year:hour:minute:second timezone].

Step 3: Determine the Time Range Decide on the time range you want to filter. You will need to provide the starting and ending timestamps in the log format mentioned earlier. For example, if you want to filter logs between June 24th, 2023, from 10:00 AM to 12:00 PM, the time range would be [24/Jun/2023:10:00:00 and [24/Jun/2023:12:00:00.

Step 4: Use Grep to Filter Logs With the log files and time range identified, you can now use grep to filter the logs. Open a terminal or SSH session to the server and execute the following command:

grep "\[24/Jun/2023:10:00:" /var/log/nginx/access.log | awk '$4 >= "[24/Jun/2023:10:00:" && $4 <= "[24/Jun/2023:12:00:"'

Replace starting_timestamp and ending_timestamp with the appropriate timestamps you determined in Step 3. The grep command searches for lines containing the starting timestamp in the log file specified (access.log in this example). The output is then piped (|) to awk, which filters the logs based on the time range.

Step 5: View Filtered Logs After executing the command, you should see the filtered logs that fall within the specified time range. The output will include the entire log lines matching the filter.

Additional Tips:

  • If you have multiple log files, you can either specify them individually in the grep command or use a wildcard character (*) to match all files in the directory.
  • You can redirect the filtered output to a file by appending > output.log at the end of the command. This will create a file named output.log containing the filtered logs.

That's it! You have successfully filtered Nginx logs using grep based on a given time range. Feel free to explore additional options and features of grep to further refine your log analysis.

0
submitted 1 year ago by root@lemmy.run to c/geopolitics@lemmy.run

cross-posted from: https://lemmy.run/post/16304

Despite his active war-mongering and mass killing of civilians in the name of drone attacks against terror groups, Barack Obama was awarded the Nobel Peace Prize in 2009.

On Thursday (June 22), former US President Barack Obama courted controversy by virtue-signalling India about its ‘human rights’ record.

Obama, who has a notorious record as a potential war criminal, suggested that the Indian Prime Minister must be told by the Biden administration about protecting the ‘Muslim minority in a majority Hindu India.’ He also hinted at another ‘partition’ if India, under the Modi government, did not mend its ways.

The former US President made the contentious remarks during an interview with CNN news host Christiane Amanpour, just hours before PM Modi made his historic address at the joint session of the US Congress.

He said, “If President (Joe Biden) meets with Prime Minister (Narendra) Modi, the protection of Muslim minority in a majority Hindu India is something worth mentioning.”

Barack Obama also claimed, “If I had a conversation with Prime Minister Modi, then, part of the conversation would be that if you do not protect the rights of minorities, then there is a strong possibility that India at some point starts pulling apart…That would be contrary to the interests of India”

The former US President, who is now mouthing platitudes about protecting the interests of Muslims in India, has been single-handedly responsible for the death of 100s of innocent people in Muslim-majority countries.

Human rights record of ‘war monger’ Barack Obama

Barack Obama scripted history in 2008 by being the first African-American man to become the President of the United States. In 2016, he also created another record of being the only President to take the country to war during the entirety of his 8-year term.

As per a report by the ‘Bureau of Investigative Journalism’, Obama oversaw more drone strikes (54) in his first year than George W Bush did in his entire term. Prior to his Presidency, he would talk about ending ‘dumb wars’ but did the opposite when he came to power.

Barack Obama, who holds the distinction of being a Nobel Peace Prize Winner, reportedly launched airstrikes in at least seven Muslim-majority countries of Afghanistan, Yemen, Somalia, Iraq, Syria, Libya and Pakistan.

He sanctioned the use of a whopping 563 drone strikes and killed 3797 people in this process. In one instance, a CIA drone strike targeted a funeral in Pakistan, which led to the death of 41 civilians in Pakistan.

More than 89 civilians in the same country were killed by the Obama administration over the course of 128 targeted drone strikes. The US President was aware that the drone strikes were far from accurate and were increasingly leading to the death of civilians.

But this did not stop him from continuing with such attacks in Somalia (2010) and Yemen (2011). Reportedly, 21 children and 12 women (five of them being pregnant)were killed by the Obama administration’s first strike in Yemen, with the aim of targeting Al-Qaeda.

It also came to light that in 2016 alone, the US government under Obama carried out at least 26,171 bombings, which translates to 72 bombings every day on civilians in other countries.

Mass civilian casualties were also reported in Afghanistan. An average of 582 people were killed annually in Afghanistan by the US, its allies and the Afghan government in Kabul between 2007 to 2016.

The Obama administration has also been accused of conducting ‘double-tap drone strikes’, which means that the site of a drone strike is attacked again. This is despite knowing the fact that such follow-up strikes lead to the death of first responders, which is against the guidelines laid down by the 1948 Geneva Conventions.

Obama administration warmed up to Muslim brotherhood, oversaw the rise of ISIS

During the tenure of Barack Obama, the US government warmed up to the radical Islamist outfit ‘Muslim Brotherhood’ in Egypt during the Arab Spring. It was a complete departure from the approach undertaken by previous US administrations.

According to author Hany Ghoraba, Barack Obama believed that he could separate the terror outfit ‘Al-Qaeda’ and Muslim Brotherhood. “Empowering the Muslim Brotherhood would, according to Obama, weaken Al-Qaeda in a decision that can be considered as one of the severest cases of political naiveté in modern times,” he noted.

“The core fault of the Obama administration was its adoption of a false rhetoric, presented for years by Islamist activists and later liberal Western politicians and pundits, that there is a distinction between the Muslim Brotherhood and Al-Qaeda,” Ghoraba pointed out.

The Arab Spring led to significant political changes in several countries, including the ousting of long-standing autocratic leaders. In Egypt, the Muslim Brotherhood’s political arm, namely, the Freedom and Justice Party, emerged as a major political force.

In 2011, the Obama administration thought it was a great idea to engage with the Muslim brotherhood-led- government, mistaking it to be a ‘new democratic force’ and looking past its radical Islamism, dangerous ideology and its mistreatment of religious minorities.

Later when protests erupted against the government in Eqypt, the Obama administration quickly took a U-turn and called for the removal of the Muslim Brotherhood-backed-Egyptian President Mohammed Morsi. Documents now reveal that the US government funded anti-Morsi activities.

The Presidential tenure of Barack Obama was also marked by the rise of the dreaded terrorist organisation, the Islamic State of Iraq and Syria aka ISIS.

One of the major contributing factors was the withdrawal of the US troops, failed negotiations with the Iraqi government and lack of residual US military presence in the country. The security vacuum left in Iraq gave opportunities for radical Islamist groups to expand.

Conclusion

Barack Obama has been at the helm of building secret drone bases in the Middle East and Africa and increasing the deployment of warships and troops in the Western Pacific and Eastern Europe.

He has been accused by his first three Defense Secretaries at the Pentagon of micro-manging the military from the White House. Through the killing of dictator Muammar Gaddafi, Barack Obama ensured that Libya plunged into complete chaos.

Later, the oil-rich nation became a magnet for terrorist groups. Despite his active war-mongering and mass killing of civilians in the name of drone attacks against terror groups, he was awarded the Nobel Peace Prize in 2009. With the left media acting as his PR agent, Obama has been able to keep up with the false image of being a ‘great ex-President.’

At the time of PM Modi’s visit to the US on the invite of the incumbent President Joe Biden, Barack Obama is pontificating the Modi administration about human rights and peddling the distorted narrative of ‘Muslims being in danger in India.’

-2
submitted 1 year ago by root@lemmy.run to c/indianews@lemmy.run

Despite his active war-mongering and mass killing of civilians in the name of drone attacks against terror groups, Barack Obama was awarded the Nobel Peace Prize in 2009.

On Thursday (June 22), former US President Barack Obama courted controversy by virtue-signalling India about its ‘human rights’ record.

Obama, who has a notorious record as a potential war criminal, suggested that the Indian Prime Minister must be told by the Biden administration about protecting the ‘Muslim minority in a majority Hindu India.’ He also hinted at another ‘partition’ if India, under the Modi government, did not mend its ways.

The former US President made the contentious remarks during an interview with CNN news host Christiane Amanpour, just hours before PM Modi made his historic address at the joint session of the US Congress.

He said, “If President (Joe Biden) meets with Prime Minister (Narendra) Modi, the protection of Muslim minority in a majority Hindu India is something worth mentioning.”

Barack Obama also claimed, “If I had a conversation with Prime Minister Modi, then, part of the conversation would be that if you do not protect the rights of minorities, then there is a strong possibility that India at some point starts pulling apart…That would be contrary to the interests of India”

The former US President, who is now mouthing platitudes about protecting the interests of Muslims in India, has been single-handedly responsible for the death of 100s of innocent people in Muslim-majority countries.

Human rights record of ‘war monger’ Barack Obama

Barack Obama scripted history in 2008 by being the first African-American man to become the President of the United States. In 2016, he also created another record of being the only President to take the country to war during the entirety of his 8-year term.

As per a report by the ‘Bureau of Investigative Journalism’, Obama oversaw more drone strikes (54) in his first year than George W Bush did in his entire term. Prior to his Presidency, he would talk about ending ‘dumb wars’ but did the opposite when he came to power.

Barack Obama, who holds the distinction of being a Nobel Peace Prize Winner, reportedly launched airstrikes in at least seven Muslim-majority countries of Afghanistan, Yemen, Somalia, Iraq, Syria, Libya and Pakistan.

He sanctioned the use of a whopping 563 drone strikes and killed 3797 people in this process. In one instance, a CIA drone strike targeted a funeral in Pakistan, which led to the death of 41 civilians in Pakistan.

More than 89 civilians in the same country were killed by the Obama administration over the course of 128 targeted drone strikes. The US President was aware that the drone strikes were far from accurate and were increasingly leading to the death of civilians.

But this did not stop him from continuing with such attacks in Somalia (2010) and Yemen (2011). Reportedly, 21 children and 12 women (five of them being pregnant)were killed by the Obama administration’s first strike in Yemen, with the aim of targeting Al-Qaeda.

It also came to light that in 2016 alone, the US government under Obama carried out at least 26,171 bombings, which translates to 72 bombings every day on civilians in other countries.

Mass civilian casualties were also reported in Afghanistan. An average of 582 people were killed annually in Afghanistan by the US, its allies and the Afghan government in Kabul between 2007 to 2016.

The Obama administration has also been accused of conducting ‘double-tap drone strikes’, which means that the site of a drone strike is attacked again. This is despite knowing the fact that such follow-up strikes lead to the death of first responders, which is against the guidelines laid down by the 1948 Geneva Conventions.

Obama administration warmed up to Muslim brotherhood, oversaw the rise of ISIS

During the tenure of Barack Obama, the US government warmed up to the radical Islamist outfit ‘Muslim Brotherhood’ in Egypt during the Arab Spring. It was a complete departure from the approach undertaken by previous US administrations.

According to author Hany Ghoraba, Barack Obama believed that he could separate the terror outfit ‘Al-Qaeda’ and Muslim Brotherhood. “Empowering the Muslim Brotherhood would, according to Obama, weaken Al-Qaeda in a decision that can be considered as one of the severest cases of political naiveté in modern times,” he noted.

“The core fault of the Obama administration was its adoption of a false rhetoric, presented for years by Islamist activists and later liberal Western politicians and pundits, that there is a distinction between the Muslim Brotherhood and Al-Qaeda,” Ghoraba pointed out.

The Arab Spring led to significant political changes in several countries, including the ousting of long-standing autocratic leaders. In Egypt, the Muslim Brotherhood’s political arm, namely, the Freedom and Justice Party, emerged as a major political force.

In 2011, the Obama administration thought it was a great idea to engage with the Muslim brotherhood-led- government, mistaking it to be a ‘new democratic force’ and looking past its radical Islamism, dangerous ideology and its mistreatment of religious minorities.

Later when protests erupted against the government in Eqypt, the Obama administration quickly took a U-turn and called for the removal of the Muslim Brotherhood-backed-Egyptian President Mohammed Morsi. Documents now reveal that the US government funded anti-Morsi activities.

The Presidential tenure of Barack Obama was also marked by the rise of the dreaded terrorist organisation, the Islamic State of Iraq and Syria aka ISIS.

One of the major contributing factors was the withdrawal of the US troops, failed negotiations with the Iraqi government and lack of residual US military presence in the country. The security vacuum left in Iraq gave opportunities for radical Islamist groups to expand.

Conclusion

Barack Obama has been at the helm of building secret drone bases in the Middle East and Africa and increasing the deployment of warships and troops in the Western Pacific and Eastern Europe.

He has been accused by his first three Defense Secretaries at the Pentagon of micro-manging the military from the White House. Through the killing of dictator Muammar Gaddafi, Barack Obama ensured that Libya plunged into complete chaos.

Later, the oil-rich nation became a magnet for terrorist groups. Despite his active war-mongering and mass killing of civilians in the name of drone attacks against terror groups, he was awarded the Nobel Peace Prize in 2009. With the left media acting as his PR agent, Obama has been able to keep up with the false image of being a ‘great ex-President.’

At the time of PM Modi’s visit to the US on the invite of the incumbent President Joe Biden, Barack Obama is pontificating the Modi administration about human rights and peddling the distorted narrative of ‘Muslims being in danger in India.’

1
submitted 1 year ago by root@lemmy.run to c/linux@programming.dev

cross-posted from: https://lemmy.run/post/15922

Running Commands in Parallel in Linux

In Linux, you can execute multiple commands simultaneously by running them in parallel. This can help improve the overall execution time and efficiency of your tasks. In this tutorial, we will explore different methods to run commands in parallel in a Linux environment.

Method 1: Using & (ampersand) symbol

The simplest way to run commands in parallel is by appending the & symbol at the end of each command. Here's how you can do it:

command_1 & command_2 & command_3 &

This syntax allows each command to run in the background, enabling parallel execution. The shell will immediately return the command prompt, and the commands will execute concurrently.

For example, to compress three different files in parallel using the gzip command:

gzip file1.txt & gzip file2.txt & gzip file3.txt &

Method 2: Using xargs with -P option

The xargs command is useful for building and executing commands from standard input. By utilizing its -P option, you can specify the maximum number of commands to run in parallel. Here's an example:

echo -e "command_1\ncommand_2\ncommand_3" | xargs -P 3 -I {} sh -c "{}" &

In this example, we use the echo command to generate a list of commands separated by newline characters. This list is then piped (|) to xargs, which executes each command in parallel. The -P 3 option indicates that a maximum of three commands should run concurrently. Adjust the number according to your requirements.

For instance, to run three different wget commands in parallel to download files:

echo -e "wget http://example.com/file1.txt\nwget http://example.com/file2.txt\nwget http://example.com/file3.txt" | xargs -P 3 -I {} sh -c "{}" &

Method 3: Using GNU Parallel

GNU Parallel is a powerful tool specifically designed to run jobs in parallel. It provides extensive features and flexibility. To use GNU Parallel, follow these steps:

  1. Install GNU Parallel if it's not already installed. You can typically find it in your Linux distribution's package manager.

  2. Create a file (e.g., commands.txt) and add one command per line:

    command_1
    command_2
    command_3
    
  3. Run the following command to execute the commands in parallel:

    parallel -j 3 < commands.txt
    

    The -j 3 option specifies the maximum number of parallel jobs to run. Adjust it according to your needs.

For example, if you have a file called urls.txt containing URLs and you want to download them in parallel using wget:

parallel -j 3 wget {} < urls.txt

GNU Parallel also offers numerous advanced options for complex parallel job management. Refer to its documentation for further information.

Conclusion

Running commands in parallel can significantly speed up your tasks by utilizing the available resources efficiently. In this tutorial, you've learned three methods for running commands in parallel in Linux:

  1. Using the & symbol to run commands in the background.
  2. Utilizing xargs with the -P option to define the maximum parallelism.
  3. Using GNU Parallel for advanced parallel job management.

Choose the method that best suits your requirements and optimize your workflow by executing commands concurrently.

2
submitted 1 year ago by root@lemmy.run to c/linux@lemmy.ml

cross-posted from: https://lemmy.run/post/15922

Running Commands in Parallel in Linux

In Linux, you can execute multiple commands simultaneously by running them in parallel. This can help improve the overall execution time and efficiency of your tasks. In this tutorial, we will explore different methods to run commands in parallel in a Linux environment.

Method 1: Using & (ampersand) symbol

The simplest way to run commands in parallel is by appending the & symbol at the end of each command. Here's how you can do it:

command_1 & command_2 & command_3 &

This syntax allows each command to run in the background, enabling parallel execution. The shell will immediately return the command prompt, and the commands will execute concurrently.

For example, to compress three different files in parallel using the gzip command:

gzip file1.txt & gzip file2.txt & gzip file3.txt &

Method 2: Using xargs with -P option

The xargs command is useful for building and executing commands from standard input. By utilizing its -P option, you can specify the maximum number of commands to run in parallel. Here's an example:

echo -e "command_1\ncommand_2\ncommand_3" | xargs -P 3 -I {} sh -c "{}" &

In this example, we use the echo command to generate a list of commands separated by newline characters. This list is then piped (|) to xargs, which executes each command in parallel. The -P 3 option indicates that a maximum of three commands should run concurrently. Adjust the number according to your requirements.

For instance, to run three different wget commands in parallel to download files:

echo -e "wget http://example.com/file1.txt\nwget http://example.com/file2.txt\nwget http://example.com/file3.txt" | xargs -P 3 -I {} sh -c "{}" &

Method 3: Using GNU Parallel

GNU Parallel is a powerful tool specifically designed to run jobs in parallel. It provides extensive features and flexibility. To use GNU Parallel, follow these steps:

  1. Install GNU Parallel if it's not already installed. You can typically find it in your Linux distribution's package manager.

  2. Create a file (e.g., commands.txt) and add one command per line:

    command_1
    command_2
    command_3
    
  3. Run the following command to execute the commands in parallel:

    parallel -j 3 < commands.txt
    

    The -j 3 option specifies the maximum number of parallel jobs to run. Adjust it according to your needs.

For example, if you have a file called urls.txt containing URLs and you want to download them in parallel using wget:

parallel -j 3 wget {} < urls.txt

GNU Parallel also offers numerous advanced options for complex parallel job management. Refer to its documentation for further information.

Conclusion

Running commands in parallel can significantly speed up your tasks by utilizing the available resources efficiently. In this tutorial, you've learned three methods for running commands in parallel in Linux:

  1. Using the & symbol to run commands in the background.
  2. Utilizing xargs with the -P option to define the maximum parallelism.
  3. Using GNU Parallel for advanced parallel job management.

Choose the method that best suits your requirements and optimize your workflow by executing commands concurrently.

1
submitted 1 year ago by root@lemmy.run to c/linuxadmin@lemmy.run

Running Commands in Parallel in Linux

In Linux, you can execute multiple commands simultaneously by running them in parallel. This can help improve the overall execution time and efficiency of your tasks. In this tutorial, we will explore different methods to run commands in parallel in a Linux environment.

Method 1: Using & (ampersand) symbol

The simplest way to run commands in parallel is by appending the & symbol at the end of each command. Here's how you can do it:

command_1 & command_2 & command_3 &

This syntax allows each command to run in the background, enabling parallel execution. The shell will immediately return the command prompt, and the commands will execute concurrently.

For example, to compress three different files in parallel using the gzip command:

gzip file1.txt & gzip file2.txt & gzip file3.txt &

Method 2: Using xargs with -P option

The xargs command is useful for building and executing commands from standard input. By utilizing its -P option, you can specify the maximum number of commands to run in parallel. Here's an example:

echo -e "command_1\ncommand_2\ncommand_3" | xargs -P 3 -I {} sh -c "{}" &

In this example, we use the echo command to generate a list of commands separated by newline characters. This list is then piped (|) to xargs, which executes each command in parallel. The -P 3 option indicates that a maximum of three commands should run concurrently. Adjust the number according to your requirements.

For instance, to run three different wget commands in parallel to download files:

echo -e "wget http://example.com/file1.txt\nwget http://example.com/file2.txt\nwget http://example.com/file3.txt" | xargs -P 3 -I {} sh -c "{}" &

Method 3: Using GNU Parallel

GNU Parallel is a powerful tool specifically designed to run jobs in parallel. It provides extensive features and flexibility. To use GNU Parallel, follow these steps:

  1. Install GNU Parallel if it's not already installed. You can typically find it in your Linux distribution's package manager.

  2. Create a file (e.g., commands.txt) and add one command per line:

    command_1
    command_2
    command_3
    
  3. Run the following command to execute the commands in parallel:

    parallel -j 3 < commands.txt
    

    The -j 3 option specifies the maximum number of parallel jobs to run. Adjust it according to your needs.

For example, if you have a file called urls.txt containing URLs and you want to download them in parallel using wget:

parallel -j 3 wget {} < urls.txt

GNU Parallel also offers numerous advanced options for complex parallel job management. Refer to its documentation for further information.

Conclusion

Running commands in parallel can significantly speed up your tasks by utilizing the available resources efficiently. In this tutorial, you've learned three methods for running commands in parallel in Linux:

  1. Using the & symbol to run commands in the background.
  2. Utilizing xargs with the -P option to define the maximum parallelism.
  3. Using GNU Parallel for advanced parallel job management.

Choose the method that best suits your requirements and optimize your workflow by executing commands concurrently.

0
submitted 1 year ago* (last edited 1 year ago) by root@lemmy.run to c/geopolitics@lemmy.run

Author: Swapnanil Chatterjee

"Being a small nation like Maldives, I sincerely value the support of the Indian NCC," said Brigadier General Wais Waheed, Commandant of Maldives Marine Corps.

Brigadier General Wais Waheed, Commandant of Maldives the Marine Corps, seeks Indian help to enchance Maldives defence capabilities (Image:PIB, MNDF)

Maldives has sought India’s help in training its cadets and for acquiring equipment for its forces. Maldives Marine Corps Commandant Brigadier General Wais Waheed on Thursday (June 22, 2023) requested assistance for the same from India’s Director General of the NCC, Lieutenant General Gurbirpal Singh.

"As a small country like the Maldives, I would greatly appreciate any assistance that the Indian NCC can provide us in terms of training, resources, and structural reforms," stated Brigadier General Waheed.

India to enhance Maldives defence and disaster response capabilities

  • Maldives will send a proposal to India, requesting assistance in training and acquiring equipment. If India deems it acceptable, then it will sanction the necessary aid for Maldives.
  • The Commandant of the Maldives National Defense Force (MNDF) spoke about the potential for future collaboration between the two countries.
  • Given that the Maldives is prone to natural disasters, Brig Gen Waheed expressed his desire to jointly train Maldivian cadets with India's support, particularly for natural disaster response and relief efforts, considering it as a force multiplier.

Military Cooperation between Maldives and India

According to the Maldivian Commandant, the training module implemented by the Indian Army is also employed by the defence forces of Maldives. The ongoing 12th edition of their annual joint exercise, Ekuverin, between the Indian Army and the Maldives National Defense Force is taking place at Chaubatia, Uttarakhand. This exercise focuses on counter-insurgency/terrorism operations, as well as humanitarian assistance and disaster relief operations conducted under the UN mandate, spanning from June 11 to 24.

Personnel of the Maldives National Defence Force, along with the Indian Army, holding the DRDO Corner Shot Weapon System.(Credit: Press Information Bureau)

Another ongoing exercise is Operation Ekatha, an annual bilateral exercise between the navies of both countries. The sixth edition of this exercise is being held in the Maldives from June 4 to July 3. The naval exercise will see the participation of Maldivian Coast Guard and Indian divers from the Navy and Marine Commandos (MARCOS). The training regimen includes underwater demolition, close-quarter battle, diving operations, and VBSS (visit, board, search, and seizure) operations.

Indian Navy personnel, along with the MNDF Coast Guard, are participating in Operation Ekatha (Credit:ANI)

How do India and Maldives benefit

Both exercises aim to enhance interoperability between the armed forces of both countries, focusing on sharing best practices, improving coordination, and fostering cooperation at the tactical level. A Ministry of Defence statement emphasised, "The defence cooperation between the two countries extends beyond joint exercises to assisting Maldives with defence training and equipment requirements." The statement from MoD implies that the interaction between the armed forces of both nations will not only strengthen friendly relations but also deepen economic, cultural, and military cooperation.

[-] root@lemmy.run -1 points 1 year ago
view more: next ›

root

joined 1 year ago
MODERATOR OF