Skip to content

Hackfi

DevOps

Recent Posts

  • Node 8266 EPS – voltage sensor – pushgateway
  • Voltage Sensor – with pico w 2
  • Pico 2 w – HC-SR04 ultrasonic distance sensor
  • Pi Pico 2 W – UF2 flash – install
  • Pico W with MQ-135 air quality sensor – Prometheus pushgateway

Health

  • Halim seed Benefits
  • Seeds health benefits – Eat Daily
  • Haldi(Turmeric) Milk – Lifes Hack

Tags

  • Arduino
  • aws
  • bash
  • cert
  • cron
  • curl
  • devops
  • docker
  • docker-compose
  • elk
  • esp32
  • grafana
  • groovy
  • haproxy
  • health
  • helm
  • Jenkins
  • k8
  • kong
  • kubernetes
  • linux
  • mysql
  • networking
  • nfs
  • nginx
  • openfaas
  • pico
  • pipeline
  • postgres
  • prometheus
  • proxy
  • python
  • questions
  • rancher
  • raspberry
  • raspberrypi
  • rust
  • security
  • shell
  • shellscript
  • sonarqube
  • ssl
  • tls
  • wifi
  • wsl
June 2021
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  
« May   Jul »

Archives

  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • October 2024
  • August 2024
  • July 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • August 2023
  • July 2023
  • May 2023
  • April 2023
  • March 2023
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • October 2019
  • August 2019
  • July 2019
  • June 2019
  • April 2019
  • March 2019
  • October 2018

Categories

  • Arduino (1)
  • aws (4)
  • cardano (1)
  • devops (30)
  • docker (22)
  • elk (5)
  • emacs (1)
  • health (3)
  • jenkins (16)
  • kubernetes (27)
  • linkerd (1)
  • linux (31)
  • logstash (1)
  • monitoring (6)
  • nix (1)
  • prometheus (2)
  • python (3)
  • raspberrypi (11)
  • security (10)
  • terraform (1)
  • Uncategorized (139)

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Pages

  • Contact
  • Health

Day: June 17, 2021

Word count in shell script

a='hello world
hello world
hello world
hello world
hello world ad a a t t hello'

n=0
> result.txt

for word in $a
do

wcount=$(echo $a| grep -o $word | wc -l)
echo "$word : $wcount" >> result.txt

done
cat result.txt | uniq
Posted on June 17, 2021June 17, 2021Categories UncategorizedTags bash, linux, shellscriptLeave a comment on Word count in shell script

recover files in linux using xfs_undelete and dd

yum install expect tcl tcllib
dd if=/dev/sda | ssh USERNAME@IP_ADDR dd of=sda.iso
xfs_undelete sda.iso

More :

https://github.com/ianka/xfs_undelete
https://unix.stackexchange.com/questions/132797/how-to-dd-a-remote-disk-using-ssh-on-local-machine-and-save-to-a-local-disk

Posted on June 17, 2021Categories UncategorizedTags dd, linux, xfsLeave a comment on recover files in linux using xfs_undelete and dd
Proudly powered by WordPress