Skip to primary content
Skip to secondary content

Ahsan Habib

Welcome to my LifeSytle blog

Ahsan Habib

Main menu

  • Home
  • About Me
  • Blog
  • Home
  • I’m in social media

Monthly Archives: September 2024

Copy file from server using “scp” command

Posted on September 27, 2024 by Ahsan Habib
Reply

root@localhost#scp -P <file.pcap> habib@10.10.10.1:/tmp/

From the localhost to 10.10.10.1 in tmp directory.

Posted in Linux | Leave a reply

Enable logging on GNOME Terminal

Posted on September 11, 2024 by Ahsan Habib
Reply
Use the "Script" command 

script ~/mylog
Script started, file is /home/-----/mylog
...

(commands that produce output)

...
exit
Script done, file is /home/------/mylog
Posted in Linux | Leave a reply

Login to a list of linux nodes and execute a command

Posted on September 5, 2024 by Ahsan Habib
Reply

Put all hostname Ip address in the hosts.text file-

for x in `cat hosts.txt`; do echo $x; ssh -t $x “mysqlcheck -uroot -paSSw0rd -A –auto-repair –all-databases | grep -v OK”; done

It will ssh to all hosts and repair mariaDB database

Posted in Linux | Leave a reply

MariaDB/mySQL tips and tricks

Posted on September 5, 2024 by Ahsan Habib
Reply
  1. To auto-repair a Database –

mysqlcheck -uroot -paSSw0rd. -A –auto-repair –all-databases

Posted in Datebase, MariaDB/mySQL | Leave a reply

Archives

  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • June 2024
  • May 2024
  • April 2024

Meta

  • Log in
Proudly powered by WordPress