-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtips
36 lines (20 loc) · 1.14 KB
/
tips
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
tcpdump ip proto \\icmp //Monitor for incoming pings
openssl s_client -connect hostname:6697 //Openssl test for ergo chat
systemctl list-units --type=service //List system D services
command! SS echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') -- Outputs Vim highlight group of selected element at cursor.
ls | sed -r "$(find -maxdepth 1 -type d | cut -d/ -f2 | sed "1 d; 2~1 { s:.*:s/^\\(&\\)$/[+]\\\\1/;:g}")"
Just run it.
find -name '*(Foo)*.zip' -type f -exec mv -t ./foo/ {} +
searchs CWD and move pattern match to ./foo/
ls | wc -l - Counts files in dir
To include hidden files (except . and ..) and avoid problems with newline characters, the canonical way is:
find . ! -name . -prune -print | grep -c /
Or recursively:
find .//. ! -name . -print | grep -c //
sudo du -sh /var - List size of files in /var
for i in *.*; do echo $i; figlet -f $i -c -w 100 -m 22 Hack The Planet; done;
nmap -sn 10.21.1.0/24 - Scans 10.21.1.0 subnet for connected IPs
${BASH_SOURCE[0]}
nmcli dev wifi list | grep SSID
nmcli -f SSID,BSSID,ACTIVE dev wifi list | grep Noisebridge
sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)