trick commands of linux.
du
To find the biggest size folder in Linux, you can use the du command along with some other commands to sort the output. Here’s an example:
du -h --max-depth=1 /path/to/directory | sort -hr
-hmakes the output human-readable, showing sizes in a more understandable format (e.g., “1K”, “1M”, “1G”).--max-depth=1limits the depth of the search to the first level of directories. If you want to search deeper, you can increase the number accordingly.
The output of the du command is piped (|) to the sort command with the following options:
-hsorts the output in human-readable format.-rsorts the output in reverse order, so the largest folders appear at the top.
tcpdump
sudo tcpdump icmp -i br0
tcpdump will start capturing ICMP packets, including ping requests. It will display information about each packet, including the source IP address.
When a ping request is received, you’ll see output similar to this:
dropped privs to tcpdump
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on br0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
23:27:53.664679 IP 192.168.52.15 > _gateway: ICMP echo request, id 54546, seq 256, length 40
23:27:53.666568 IP _gateway > 192.168.52.15: ICMP echo reply, id 54546, seq 256, length 40
23:28:03.490938 IP DESKTOP-3UTVEQO > 192.168.52.110: ICMP echo request, id 1, seq 584, length 40