Tags » Bash Script

Binary Search Using Bash Script

Chắc hẳn dân IT đều biết thuật toán tìm kiếm nhị phân rồi. Thay vì viết bằng C hay Python, tôi quyết định viết bằng bash cho nó máu :D… 65 more words


sudo asks for password even if NOPASSWD is set in /etc/sudoers

TL;DR when a script is not marked as executable and you try to run it with sudo, you don’t get the usual -bash: myScript.sh: Permission denied… 314 more words


The BASH shell, and basic needs

Now we can begin!

There are some prerequisites to operating within the shell in a ‘nix environment:

1. DO NO HARM!….. I know it sounds corny (korny?), but the first commandment of a ‘nix sysadmin is a big one, and not following it, particularly when possessing elevated or root privileges, can cost you time, money, effort, and possibly your job!… You ARE backing up, right? 187 more words


Nmap - Scan for open ports

nmap is a network exploration tool and security/port scanner.

We can list all open ports using nmap for a given IP/Host.

Use following command to list all open ports: 32 more words