-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.jsonl
1767 lines (1765 loc) · 211 KB
/
data.jsonl
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{"instruction":"Activate a Python virtual environment","output":"source venv/bin/activate"}
{"instruction":"Add a user to the sudoers file","output":"sudo usermod -aG sudo username"}
{"instruction":"add firewall rule","output":"iptables -A INPUT -p tcp --dport 80 -j ACCEPT"}
{"instruction":"add user to group","output":"usermod -aG group user"}
{"instruction":"Analyze a shell script for errors using 'shellcheck'","output":"shellcheck script.sh"}
{"instruction":"Analyze disk usage interactively with 'ncdu'","output":"ncdu"}
{"instruction":"Analyze disk usage with 'ncdu'","output":"ncdu"}
{"instruction":"Analyze nginx logs to show top IP addresses causing 404 errors","output":"awk '$9 == 404{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn"}
{"instruction":"Backup all .conf files modified in the last 24 hours","output":"find /etc -name '*.conf' -mtime -1 -type f -exec cp --parents{} /backup/ \\;"}
{"instruction":"Backup a MySQL database and compress the output","output":"mysqldump -u user -p database_name | gzip > backup.sql.gz"}
{"instruction":"Build a machine image using 'packer'","output":"packer build template.json"}
{"instruction":"Calculate network information for an IP address using 'ipcalc'","output":"ipcalc 192.168.1.0/24"}
{"instruction":"Capture and display network packets for port 80 using 'tcpdump'","output":"sudo tcpdump -i eth0 port 80"}
{"instruction":"Capture network packets and save to a file using 'tshark'","output":"sudo tshark -i eth0 -w capture.pcap"}
{"instruction":"Capture network packets on interface 'eth0' and save to a file","output":"sudo tcpdump -i eth0 -w capture.pcap"}
{"instruction":"Change default shell to 'zsh'","output":"chsh -s $(which zsh)"}
{"instruction":"change owner of file","output":"chown user:group file"}
{"instruction":"change permissions to read-write","output":"chmod 644"}
{"instruction":"change user password","output":"passwd username"}
{"instruction":"Check a program for memory leaks using 'valgrind'","output":"valgrind --leak-check=full ./program"}
{"instruction":"check disk errors","output":"fsck /dev/sda1"}
{"instruction":"Check disk I/O patterns of specific process","output":"iotop -p $(pgrep process_name)"}
{"instruction":"Check disk usage and display only filesystems over 80% usage","output":"df -h | awk '\\$5 > 80{print \\$0}'"}
{"instruction":"Check for files with abnormal timestamps","output":"find . -type f -newermt $(date -d '1 hour ago' +'%Y-%m-%d %H:%M:%S') ! -newermt $(date +'%Y-%m-%d %H:%M:%S') -ls"}
{"instruction":"Check for package updates on a Debian-based system","output":"sudo apt update && apt list --upgradable"}
{"instruction":"Check for rootkits using 'chkrootkit'","output":"sudo chkrootkit"}
{"instruction":"Check for rootkits using 'rkhunter'","output":"sudo rkhunter --check"}
{"instruction":"Check if a service is enabled to start on boot","output":"systemctl is-enabled service_name"}
{"instruction":"Check if a website is reachable and display the HTTP status code","output":"curl -o /dev/null -s -w '%{http_code}\\n' https://www.example.com"}
{"instruction":"Check if 'ifconfig' is available and install 'net-tools' if not","output":"command -v ifconfig >/dev/null 2>&1 || sudo apt install net-tools"}
{"instruction":"Check if 'ss' command is available and install 'iproute2' if not","output":"command -v ss >/dev/null 2>&1 || sudo apt install iproute2"}
{"instruction":"Check if 'sshd' is running and start it if not","output":"sudo systemctl status ssh || sudo systemctl start ssh"}
{"instruction":"check network connections","output":"netstat -tuln"}
{"instruction":"Check response time of multiple URLs","output":"for url in $(cat urls.txt); do curl -o /dev/null -s -w \"%{url_effective}: %{time_total}s\n\" $url; done"}
{"instruction":"Check the memory usage of a specific process","output":"pmap PID | tail -n 1"}
{"instruction":"Check the SMART status of a hard drive","output":"sudo smartctl -H /dev/sda"}
{"instruction":"Check the SSL certificate expiration date of a domain","output":"echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -noout -dates"}
{"instruction":"Check the status of all Docker containers","output":"docker ps -a"}
{"instruction":"Check the status of all systemd services","output":"systemctl list-units --type=service"}
{"instruction":"Check the status of RAID arrays","output":"cat /proc/mdstat"}
{"instruction":"Check UFW firewall status and rules","output":"sudo ufw status verbose"}
{"instruction":"Clean old systemd journal entries","output":"journalctl --vacuum-time=7d"}
{"instruction":"Clean up broken symlinks recursively","output":"find . -type l ! -exec test -e{} \\; -print -delete"}
{"instruction":"clear terminal screen","output":"clear"}
{"instruction":"Clone a Git repository and checkout a specific branch","output":"git clone -b branch_name repository_url"}
{"instruction":"Clone a Git repository to a local directory","output":"git clone https://github.com/user/repository.git"}
{"instruction":"Compare the contents of two directories","output":"diff -qr dir1/ dir2/"}
{"instruction":"Compile a C program using 'gcc'","output":"gcc -o program program.c"}
{"instruction":"Compress a directory excluding specific subdirectories","output":"tar --exclude='dir_to_exclude' -czvf archive.tar.gz /path/to/directory"}
{"instruction":"Compress all files modified in the last 24 hours into a tar.gz archive","output":"find . -type f -mtime -1 -print0 | tar -czvf archive.tar.gz --null -T -"}
{"instruction":"compress file with gzip","output":"gzip file"}
{"instruction":"compress folder","output":"tar -czf archive.tar.gz folder/"}
{"instruction":"Compress multiple files into a zip archive","output":"zip archive.zip file1 file2 file3"}
{"instruction":"Configure AWS CLI with your credentials","output":"aws configure"}
{"instruction":"Configure Git with your username and email","output":"git config --global user.name 'Your Name'; git config --global user.email 'you@example.com'"}
{"instruction":"Connect to an FTP server using 'ftp'","output":"ftp ftp.example.com"}
{"instruction":"Convert all PNG images to JPEG format","output":"find . -name '*.png' -type f -exec mogrify -format jpg{} \\;"}
{"instruction":"Convert all .wav audio files to .mp3 format using 'ffmpeg'","output":"find . -name '*.wav' -type f -exec ffmpeg -i{} -vn -ar 44100 -ac 2 -b 192k{}.mp3 ;"}
{"instruction":"Convert DOS line endings to Unix in all shell scripts","output":"find . -name '*.sh' -type f -exec dos2unix{} \\;"}
{"instruction":"Copy a file to a remote server using SCP with password authentication","output":"sshpass -p 'password' scp file.txt user@example.com:/remote/path"}
{"instruction":"Copy a large file and show progress using 'pv'","output":"pv largefile.iso > /destination/largefile.iso"}
{"instruction":"copy file.txt to backup folder","output":"cp file.txt backup/"}
{"instruction":"Copy SSH public key to a remote server for passwordless login","output":"ssh-copy-id user@example.com"}
{"instruction":"count lines in file","output":"wc -l file.txt"}
{"instruction":"Count lines of code by file extension","output":"find . -type f -name '*.*' | grep -v '.git' | xargs file | grep 'text' | awk -F: '{print $1}' | xargs wc -l | sort -nr"}
{"instruction":"Count lines of code in a directory using 'cloc'","output":"cloc /path/to/code"}
{"instruction":"Count lines of code in all Python files excluding comments","output":"find . -name '*.py' -type f -exec grep -v '^#'{} \\; | wc -l"}
{"instruction":"Count the number of files in each subdirectory","output":"find . -type d -exec sh -c 'echo -n \"{}: \"; find \"{}\" -maxdepth 1 -type f | wc -l' \\;"}
{"instruction":"Count the number of files in each subdirectory","output":"find . -type d -print0 | xargs -0 -I{} sh -c 'echo -n{}\": \"; find{} -maxdepth 1 -type f | wc -l'"}
{"instruction":"Count the number of lines of code in all JavaScript files","output":"find . -name '*.js' -type f -exec wc -l{} + | awk '{total += $1} END{print total}'"}
{"instruction":"Count the number of lines of code in all Python files","output":"find . -name '*.py' -type f -exec wc -l{} + | awk '{total += $1} END{print total}'"}
{"instruction":"Count the number of words in all .md files","output":"find . -name '*.md' -type f -exec wc -w{} + | awk '{total += $1} END{print total}'"}
{"instruction":"Count the number of words in all .txt files","output":"find . -name '*.txt' -type f -exec wc -w{} + | awk '{total += \\$1} END{print total}'"}
{"instruction":"Count unique IP addresses in access.log","output":"grep -o '[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}' access.log | sort -u | wc -l"}
{"instruction":"Create a compressed backup of a MySQL database","output":"mysqldump -u user -p database_name | gzip > database_name.sql.gz"}
{"instruction":"Create a file containing the list of all installed packages (Debian/Ubuntu)","output":"dpkg --get-selections > installed_packages.txt"}
{"instruction":"Create a Git commit with all current changes and a message","output":"git add . && git commit -m 'Your commit message'"}
{"instruction":"Create an archive of a directory excluding certain files or directories","output":"tar --exclude='dir_to_exclude' -czvf archive.tar.gz /path/to/directory"}
{"instruction":"Create a new directory and set permissions to 755","output":"mkdir new_directory && chmod 755 new_directory"}
{"instruction":"Create a new Python virtual environment in a directory","output":"virtualenv /path/to/new/virtualenv"}
{"instruction":"Create a new user and set their home directory","output":"useradd -m -d /home/username username"}
{"instruction":"Create a pull request on GitHub using 'hub'","output":"hub pull-request -m 'Message' -b base -h head"}
{"instruction":"Create a Python virtual environment in a directory","output":"python3 -m venv /path/to/venv"}
{"instruction":"Create a simple chat server using 'ncat'","output":"ncat -l 5000"}
{"instruction":"Create a simple HTTP server in the current directory","output":"python3 -m http.server 8000"}
{"instruction":"Create a simple TCP port forward using 'socat'","output":"socat TCP-LISTEN:8080,fork TCP:localhost:80"}
{"instruction":"Create a tar archive of a directory and exclude certain files","output":"tar --exclude='*.tmp' -czvf archive.tar.gz /path/to/directory"}
{"instruction":"create empty file","output":"touch newfile.txt"}
{"instruction":"create new directory called test","output":"mkdir test"}
{"instruction":"create new user","output":"useradd username"}
{"instruction":"create symbolic link","output":"ln -s target link_name"}
{"instruction":"create zip archive","output":"zip archive.zip files"}
{"instruction":"decompress gzip file","output":"gunzip file.gz"}
{"instruction":"Decrypt a GPG encrypted file","output":"gpg file.txt.gpg"}
{"instruction":"delete user","output":"userdel username"}
{"instruction":"Detach from a 'screen' session and reattach later","output":"Press 'Ctrl+A' then 'D' to detach; Use 'screen -r session_name' to reattach"}
{"instruction":"Detach from a 'screen' session","output":"Press 'Ctrl+a' then 'd'"}
{"instruction":"Display a calendar for the current month with highlighted current day","output":"cal"}
{"instruction":"Display all available disk space including filesystem type","output":"df -Th"}
{"instruction":"Display all established SSH connections","output":"netstat -tnpa | grep 'ESTABLISHED.*sshd'"}
{"instruction":"Display all mounted filesystems and their mount points","output":"mount | column -t"}
{"instruction":"Display all network interfaces using 'ifconfig'","output":"ifconfig -a"}
{"instruction":"Display all processes in a hierarchical tree format","output":"pstree"}
{"instruction":"Display all scheduled cron jobs for the current user","output":"crontab -l"}
{"instruction":"Display all users currently logged into the system","output":"who"}
{"instruction":"Display a tree of directories and files up to 3 levels deep","output":"tree -L 3"}
{"instruction":"Display a tree view of the current directory","output":"tree"}
{"instruction":"Display CPU usage report using 'sar'","output":"sar -u 1 3"}
{"instruction":"Display disk usage in a human-readable format for all mounted filesystems","output":"df -h"}
{"instruction":"Display disk usage of all directories, sorted by size","output":"du -sh * | sort -hr"}
{"instruction":"Display disk usage of the current directory excluding hidden files","output":"du -sh --exclude='.*' *"}
{"instruction":"Display disk usage statistics for each filesystem","output":"df -hT"}
{"instruction":"Display hardware information about the CPU","output":"lscpu"}
{"instruction":"Display hardware information using 'dmidecode'","output":"sudo dmidecode"}
{"instruction":"Display lines between 'START' and 'END' in a file","output":"sed -n '/START/,/END/p' file.txt"}
{"instruction":"Display network interface capabilities using 'ethtool'","output":"sudo ethtool eth0"}
{"instruction":"Display only the IP addresses from 'ifconfig' output","output":"ifconfig | grep 'inet ' | awk '{print \\$2}'"}
{"instruction":"Display per-processor statistics using 'mpstat'","output":"mpstat -P ALL"}
{"instruction":"Display routing table using 'netstat'","output":"netstat -rn"}
{"instruction":"Display system information using 'screenfetch'","output":"screenfetch"}
{"instruction":"Display system information using 'uname'","output":"uname -a"}
{"instruction":"Display the 10 most frequently used commands from your history","output":"history | awk '{CMD[$2]++} END{for(a in CMD) print CMD[a], a}' | sort -rn | head -10"}
{"instruction":"Display the amount of available and used swap memory","output":"swapon --show"}
{"instruction":"Display the amount of free and used memory in the system","output":"free -h"}
{"instruction":"Display the current CPU temperature","output":"sensors | grep 'Core 0' | awk '{print $3}'"}
{"instruction":"Display the current month's calendar with the current day highlighted","output":"cal"}
{"instruction":"Display the current runlevel of the system","output":"runlevel"}
{"instruction":"Display the current system date and time in UTC","output":"date -u"}
{"instruction":"Display the current system runlevel","output":"runlevel"}
{"instruction":"Display the current system's uptime in a human-readable format","output":"uptime -p"}
{"instruction":"Display the current system timezone","output":"timedatectl"}
{"instruction":"Display the current timezone and date settings","output":"timedatectl"}
{"instruction":"Display the current user's crontab entries","output":"crontab -l"}
{"instruction":"Display the current user's disk quota","output":"quota -v"}
{"instruction":"Display the current user's group memberships","output":"groups \\$USER"}
{"instruction":"Display the default DNS nameservers","output":"cat /etc/resolv.conf | grep nameserver"}
{"instruction":"Display the default gateway and routing table","output":"ip route show"}
{"instruction":"Display the default gateway","output":"ip route | grep default"}
{"instruction":"Display the difference between two directories","output":"diff -qr dir1/ dir2/"}
{"instruction":"Display the differences between two directories","output":"diff -r dir1/ dir2/"}
{"instruction":"Display the directory structure as a tree","output":"tree"}
{"instruction":"Display the first 5 lines of a file","output":"head -n 5 file.txt"}
{"instruction":"Display the kernel ring buffer messages","output":"dmesg"}
{"instruction":"Display the last 10 lines of multiple files","output":"tail -n 10 file1.txt file2.txt"}
{"instruction":"Display the last 50 commands from your history","output":"history | tail -n 50"}
{"instruction":"Display the last 50 system logs","output":"journalctl -n 50"}
{"instruction":"Display the last login time of all users","output":"lastlog"}
{"instruction":"Display the last modified times of files in a directory","output":"ls -lt --time-style=long-iso"}
{"instruction":"Display the MAC address of all network interfaces","output":"ip link show | grep link/ether | awk '{print \\$2}'"}
{"instruction":"Display the number of CPU cores available","output":"nproc"}
{"instruction":"Display the number of CPUs available","output":"grep -c ^processor /proc/cpuinfo"}
{"instruction":"Display the number of established connections per IP","output":"netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr"}
{"instruction":"Display the number of established SSH connections","output":"ss -o state established '( dport = or sport =)' | wc -l"}
{"instruction":"Display the number of established TCP connections","output":"netstat -an | grep ESTABLISHED | wc -l"}
{"instruction":"Display the number of running processes","output":"ps aux | wc -l"}
{"instruction":"Display the permissions of all files in the current directory","output":"ls -l"}
{"instruction":"Display the process tree","output":"pstree"}
{"instruction":"Display the routing table","output":"ip route show"}
{"instruction":"Display the size and name of the largest files","output":"find . -type f -exec du -h{} + | sort -hr | head -n 10"}
{"instruction":"Display the size of a file in bytes","output":"stat -c%s file.txt"}
{"instruction":"Display the size of all subdirectories in the current directory","output":"du -h --max-depth=1"}
{"instruction":"Display the size of each subdirectory in human-readable format","output":"du -sh */"}
{"instruction":"Display the system's entropy level","output":"cat /proc/sys/kernel/random/entropy_avail"}
{"instruction":"Display the system's hardware clock time","output":"sudo hwclock --show"}
{"instruction":"Display the system's hardware information using 'lshw'","output":"sudo lshw -short"}
{"instruction":"Display the system's hostname and IP address","output":"echo \"Hostname: \\$(hostname)\"; echo \"IP Address: \\$(hostname -I | awk '{print \\$1}')\""}
{"instruction":"Display the top 10 IP addresses accessing your web server","output":"awk '{print $1}' /var/log/apache2/access.log | sort | uniq -c | sort -nr | head -10"}
{"instruction":"Display the top 10 largest files in the home directory","output":"find ~ -type f -exec du -h{} + | sort -hr | head -n 10"}
{"instruction":"Display the total number of lines in all files in a directory","output":"find . -type f -exec wc -l{} + | tail -n 1"}
{"instruction":"Display the total size of all files in the current directory","output":"du -sh"}
{"instruction":"Display the total size of all '.log' files","output":"find . -name '*.log' -type f -exec du -ch{} + | grep 'total$'"}
{"instruction":"Display the UUIDs of all mounted filesystems","output":"blkid | grep \\$(mount | awk '{print \\$1}')"}
{"instruction":"Display who is logged on and what they are doing","output":"w"}
{"instruction":"Download a file from FTP server using wget","output":"wget ftp://username:password@ftp.example.com/path/to/file"}
{"instruction":"Download a file from the internet and save it with a specific name","output":"curl -o filename 'http://example.com/file.txt'"}
{"instruction":"download a file from URL","output":"wget{URL}"}
{"instruction":"Download a file using multiple connections with 'aria2'","output":"aria2c -x 16 http://example.com/file.iso"}
{"instruction":"Download all images from a website using 'wget'","output":"wget -r -A '*.jpg,*.png' http://www.example.com"}
{"instruction":"Download an entire website recursively using 'wget'","output":"wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://example.com"}
{"instruction":"Download a webpage and save it to a file","output":"curl -o page.html https://www.example.com"}
{"instruction":"Edit a file using 'vim'","output":"vim file.txt"}
{"instruction":"edit scheduled tasks","output":"crontab -e"}
{"instruction":"Enable 'thefuck' to correct previous command mistakes","output":"eval $(thefuck --alias)"}
{"instruction":"Enable UFW firewall and allow SSH connections","output":"sudo ufw allow ssh && sudo ufw enable"}
{"instruction":"Encrypt a file using GPG symmetric encryption","output":"gpg -c file.txt"}
{"instruction":"Extract all unique domain names from an email list","output":"grep -Eo '[\\w.%+-]+@[\\w.-]+\\.[a-zA-Z]{2,6}' emails.txt | awk -F'@' '{print $2}' | sort | uniq"}
{"instruction":"Extract all URLs from a set of text files","output":"grep -Eo 'http[s]?://[^\\s\"]+' *.txt"}
{"instruction":"extract archive","output":"tar -xzf archive.tar.gz"}
{"instruction":"Extract a specific column from a CSV file","output":"cut -d',' -f3 file.csv"}
{"instruction":"Extract audio from 'video.mp4' and save as 'audio.mp3'","output":"ffmpeg -i video.mp4 -q:a 0 -map a audio.mp3"}
{"instruction":"Extract IP addresses from access logs","output":"grep -oE '\\b([0-9]{1,3}\\.){3}[0-9]{1,3}\\b' access.log | sort | uniq"}
{"instruction":"Extract the audio from a video file using 'ffmpeg'","output":"ffmpeg -i input_video.mp4 -q:a 0 -map a output_audio.mp3"}
{"instruction":"Extract the second field from a colon-separated file","output":"awk -F':' '{print $2}' file.txt"}
{"instruction":"extract zip archive","output":"unzip archive.zip"}
{"instruction":"Find a file quickly using 'locate'","output":"locate filename"}
{"instruction":"Find all broken symbolic links and remove them","output":"find . -xtype l -exec rm{} ;"}
{"instruction":"Find all docker containers using more than 1GB memory","output":"docker stats --no-stream --format '{{.Container}}\t{{.MemUsage}}' | awk '$2 ~ /GiB/ && substr($2,1,length($2)-4) > 1'"}
{"instruction":"Find all empty directories and remove them","output":"find . -type d -empty -delete"}
{"instruction":"Find all empty files and directories and list them","output":"find . -empty"}
{"instruction":"Find all files containing a specific string and count the occurrences","output":"grep -roh 'pattern' . | wc -l"}
{"instruction":"Find all files containing the string 'ERROR' and print their paths","output":"grep -rl 'ERROR' ."}
{"instruction":"Find all files containing 'TODO' and print their names and line numbers","output":"grep -rnw '.' -e 'TODO'"}
{"instruction":"Find all files ending with .bak and delete them after confirmation","output":"find . -type f -name '*.bak' -exec rm -i{} ;"}
{"instruction":"Find all files larger than 100MB and list their sizes","output":"find . -type f -size +100M -exec ls -lh{} \\;"}
{"instruction":"Find all files larger than 1GB and compress them using 'xz'","output":"find . -type f -size +1G -exec xz{} ;"}
{"instruction":"Find all files larger than 1GB and list their sizes","output":"find . -type f -size +1G -exec ls -lh{} \\;"}
{"instruction":"Find all files larger than 500MB and prompt before deleting","output":"find . -type f -size +500M -exec rm -i{} \\;"}
{"instruction":"Find all files modified between two dates","output":"find . -type f -newermt '2022-01-01' ! -newermt '2022-02-01'"}
{"instruction":"Find all files modified between two specific dates","output":"find . -type f -newermt '2022-01-01' ! -newermt '2022-12-31'"}
{"instruction":"Find all files modified in the last 5 days and copy them to a backup directory","output":"find . -type f -mtime -5 -exec cp --parents{} /backup/directory ;"}
{"instruction":"Find all files modified in the last 7 days and compress them","output":"find . -type f -mtime -7 -exec gzip{} \\;"}
{"instruction":"Find all files not accessed in the last 30 days and delete them","output":"find . -type f -atime +30 -exec rm{} \\;"}
{"instruction":"Find all files not owned by any user or group","output":"find / -nouser -o -nogroup 2>/dev/null"}
{"instruction":"Find all files owned by a specific group and change ownership","output":"find /path -group oldgroup -exec chown{} ;"}
{"instruction":"Find all files owned by the current user","output":"find . -type f -user \\$USER"}
{"instruction":"Find all files owned by user 'john'","output":"find / -user john -print 2>/dev/null"}
{"instruction":"Find all files that have been changed in the Git repository but not committed","output":"git diff --name-only"}
{"instruction":"Find all files with 777 permissions and change them to 755","output":"find . -perm 0777 -type f -exec chmod 755{} \\;"}
{"instruction":"Find all files with a specific extension and count the number of lines containing a pattern","output":"grep -roh 'pattern' --include='*.ext' . | wc -l"}
{"instruction":"Find all files with incorrect permissions and fix them","output":"find . -type f -perm 0000 -exec chmod 644{} ;"}
{"instruction":"Find all files with more than 1000 lines","output":"find . -type f -exec awk 'END{if (NR > 1000) print FILENAME}'{} ;"}
{"instruction":"Find all files with permission 777 and change to 755","output":"find . -type f -perm 0777 -exec chmod 755{} \\;"}
{"instruction":"Find all files with special characters in their names","output":"find . -type f | grep --color='auto' -P '[^a-zA-Z0-9/\\._-]'"}
{"instruction":"Find all files with SUID or SGID bits set","output":"find / -perm /6000 -type f -exec ls -ldb{} \\; 2>/dev/null"}
{"instruction":"Find all files with '.tmp' extension and delete them","output":"find . -type f -name '*.tmp' -exec rm -f{} ;"}
{"instruction":"Find all image files and convert them to a different format","output":"find . -type f -name '*.png' -exec convert{}{}.jpg \\;"}
{"instruction":"Find all images larger than 5MB and resize them to 1920x1080","output":"find . -type f -name '*.jpg' -size +5M -exec mogrify -resize 1920x1080{} ;"}
{"instruction":"Find all JPEG images and create thumbnails","output":"find . -name '*.jpg' -exec convert{} -resize 100x100 thumb_{} \\;"}
{"instruction":"Find all JPEG images and resize them to 800x600 pixels","output":"find . -name '*.jpg' -type f -exec mogrify -resize 800x600{} \\;"}
{"instruction":"Find all .log files and display the 5 most frequent error messages","output":"grep -h 'error' *.log | sort | uniq -c | sort -nr | head -5"}
{"instruction":"Find all open files by a specific process","output":"lsof -p PID"}
{"instruction":"Find all processes consuming more than 100MB of memory","output":"ps aux | awk '\\$6 > 102400{print \\$0}'"}
{"instruction":"Find all processes using a specific file or directory","output":"lsof +D /path/to/directory"}
{"instruction":"find all python files","output":"find . -name '*.py'"}
{"instruction":"Find all setuid and setgid files","output":"find / -perm /6000 -type f 2>/dev/null"}
{"instruction":"Find all symbolic links in the current directory and its subdirectories","output":"find . -type l -ls"}
{"instruction":"Find and compress log files older than 7 days","output":"find /var/log -name '*.log' -mtime +7 -exec gzip{} \\;"}
{"instruction":"Find and delete all core dump files","output":"find / -type f -name 'core' -exec rm -f{} \\;"}
{"instruction":"Find and delete all '.DS_Store' files","output":"find . -type f -name '.DS_Store' -exec rm{} \\;"}
{"instruction":"Find and delete all files ending with '~'","output":"find . -type f -name '*~' -exec rm{} \\;"}
{"instruction":"Find and delete all files in '/tmp' not modified in the last 7 days","output":"find /tmp -type f -mtime +7 -exec rm{} \\;"}
{"instruction":"Find and delete all files not accessed in the last year","output":"find . -type f -atime +365 -exec rm{} \\;"}
{"instruction":"Find and delete all log files older than 30 days","output":"find /var/log -type f -name '*.log' -mtime +30 -exec rm -f{} ;"}
{"instruction":"Find and delete all .tmp files older than 7 days","output":"find . -name '*.tmp' -type f -mtime +7 -exec rm{} \\;"}
{"instruction":"Find and delete files older than 6 months","output":"find . -type f -mtime +180 -exec rm -f{} ;"}
{"instruction":"Find and display all empty files","output":"find . -type f -empty"}
{"instruction":"Find and display all files containing a specific word, case-insensitive","output":"grep -ril 'word' ."}
{"instruction":"Find and display all files modified in the last 24 hours","output":"find . -type f -mtime -1"}
{"instruction":"Find and display all files modified today","output":"find . -type f -mtime 0"}
{"instruction":"Find and display all files owned by 'root'","output":"sudo find / -user root -type f 2>/dev/null"}
{"instruction":"Find and display all files that are block devices","output":"find /dev -type b"}
{"instruction":"Find and display all files that are character devices","output":"find /dev -type c"}
{"instruction":"Find and display all files that are FIFOs (named pipes)","output":"find . -type p"}
{"instruction":"Find and display all files that are named pipes","output":"find . -type p"}
{"instruction":"Find and display all files that are sockets","output":"find . -type s"}
{"instruction":"Find and display all files with ACL permissions","output":"find / -perm -u+x -type f 2>/dev/null | xargs getfacl 2>/dev/null | grep 'user::rwx'"}
{"instruction":"Find and display all files with a specific extension and size greater than 100MB","output":"find . -type f -name '*.ext' -size +100M -exec ls -lh{} \\;"}
{"instruction":"Find and display all files with names starting with a dot","output":"find . -type f -name '.*'"}
{"instruction":"Find and display all files with read permission for others","output":"find . -type f -perm -o=r"}
{"instruction":"Find and display all files with setuid bit set","output":"find / -perm /4000 2>/dev/null"}
{"instruction":"Find and display all files with write permission for group","output":"find . -type f -perm -g=w"}
{"instruction":"Find and display all files with write permission for others","output":"find . -type f -perm -o=w"}
{"instruction":"Find and display all hidden files in the current directory","output":"ls -ld .*"}
{"instruction":"Find and display all listening TCP ports","output":"sudo netstat -tulpn | grep LISTEN"}
{"instruction":"Find and display all SSL certificates on the system","output":"sudo find / -name '.crt' -o -name '.pem' 2>/dev/null"}
{"instruction":"Find and kill all processes matching a pattern","output":"pkill -f pattern"}
{"instruction":"Find and kill all zombie processes","output":"ps aux | awk '/Z/{print \\$2}' | xargs kill -9"}
{"instruction":"Find and kill a process by name","output":"pkill -f process_name"}
{"instruction":"Find and kill processes listening on port 8080","output":"sudo fuser -k 8080/tcp"}
{"instruction":"Find and kill processes listening on port 8080","output":"sudo lsof -t -i:8080 | xargs kill -9"}
{"instruction":"Find and kill processes running longer than 24 hours","output":"ps -eo pid,etime,cmd | awk 'NR>1 && $2 ~ /^[0-9]+[-:].*/{split($2,t,/-|:/); if(t[1]>=24) print $1}' | xargs kill"}
{"instruction":"Find and list all block devices","output":"lsblk"}
{"instruction":"Find and list all broken symbolic links","output":"find . -xtype l -print"}
{"instruction":"Find and list all directories with 777 permissions","output":"find . -type d -perm 0777"}
{"instruction":"Find and list all executable files in a directory","output":"find . -type f -executable -print"}
{"instruction":"Find and list all executable files in PATH directories","output":"find \\$(echo \\$PATH | tr ':' ' ') -type f -executable"}
{"instruction":"Find and list all files accessed by a specific user","output":"sudo find / -user username -ls 2>/dev/null"}
{"instruction":"Find and list all files accessed in the last 10 minutes","output":"find . -type f -amin -10"}
{"instruction":"Find and list all files containing non-ASCII characters","output":"grep --color='auto' -P -n '[^\\x00-\\x7F]' file.txt"}
{"instruction":"Find and list all files larger than 10MB and modified in the last 7 days","output":"find . -type f -size +10M -mtime -7 -exec ls -lh{} \\;"}
{"instruction":"Find and list all files larger than 1GB","output":"find . -type f -size +1G -exec ls -lh{} \\;"}
{"instruction":"Find and list all files modified in the last 10 days","output":"find . -type f -mtime -10"}
{"instruction":"Find and list all files modified in the last 15 minutes","output":"find . -type f -mmin -15"}
{"instruction":"Find and list all files modified in the last 2 hours","output":"find . -type f -mmin -120 -exec ls -lh{} ;"}
{"instruction":"Find and list all files that are hard links","output":"find . -type f -links +1"}
{"instruction":"Find and list all files with 'execute' permission for the owner","output":"find . -type f -perm -u=x"}
{"instruction":"Find and list all files with extension '.bak'","output":"find . -type f -name '*.bak'"}
{"instruction":"Find and list all files with names containing spaces","output":"find . -type f -name '* *'"}
{"instruction":"Find and list all files with 'read' permission for group","output":"find . -type f -perm -g=r"}
{"instruction":"Find and list all files with SELinux security context","output":"ls -Z"}
{"instruction":"Find and list all files with special characters in their names","output":"find . -type f | grep --color='auto' -P '[^a-zA-Z0-9/\\._-]'"}
{"instruction":"Find and list all files with sticky bit set","output":"find . -type f -perm /1000"}
{"instruction":"Find and list all files with the SUID bit set","output":"find / -perm /4000 -type f 2>/dev/null"}
{"instruction":"Find and list all open file descriptors of a process","output":"ls -l /proc/PID/fd"}
{"instruction":"Find and list all processes running under a specific user","output":"ps -u username"}
{"instruction":"Find and remove all Docker containers and images","output":"docker rm $(docker ps -aq); docker rmi $(docker images -q)"}
{"instruction":"Find and remove all files larger than 500MB","output":"find . -type f -size +500M -exec rm -i{} ;"}
{"instruction":"Find and remove all files with a .bak extension","output":"find . -type f -name '*.bak' -exec rm{} \\;"}
{"instruction":"Find and remove duplicate lines in a file","output":"awk '!seen[\\$0]++' file.txt > unique_file.txt"}
{"instruction":"Find and remove empty directories","output":"find . -type d -empty -delete"}
{"instruction":"Find and remove empty directories","output":"find . -type d -empty -exec rmdir{} \\;"}
{"instruction":"Find and remove files with special characters in names","output":"find . -name '*[^a-zA-Z0-9._-]*' -exec rm -i{} \\;"}
{"instruction":"Find and remove large log files","output":"find /var/log -type f -size +100M -exec rm{} \\;"}
{"instruction":"Find and remove old core dump files","output":"find / -name 'core.*' -type f -mtime +7 -exec rm{} \\;"}
{"instruction":"Find and replace 'foo' with 'bar' across multiple files interactively","output":"find . -type f -exec sed -i 's/foo/bar/g'{} \\;"}
{"instruction":"Find and replace 'http' with 'https' in all HTML files","output":"find . -name '*.html' -type f -exec sed -i 's/http:/https:/g'{} \\;"}
{"instruction":"Find and replace 'oldtext' with 'newtext' in all .conf files","output":"find . -name '*.conf' -type f -exec sed -i 's/oldtext/newtext/g'{} \\;"}
{"instruction":"Find and replace text in multiple files using 'perl'","output":"perl -pi -e 's/oldtext/newtext/g' \\$(grep -rl 'oldtext' .)"}
{"instruction":"Find common lines between multiple files","output":"sort file1 file2 file3 | uniq -d"}
{"instruction":"Find duplicate files based on content","output":"find . -type f -exec md5sum{} \\; | sort | uniq -d -w32"}
{"instruction":"Find duplicate files based on size and name","output":"find . -type f -printf '%s %p\\n' | sort -n | uniq -D -w1"}
{"instruction":"find duplicate files","output":"fdupes ."}
{"instruction":"Find duplicate image files based on content","output":"find . -type f -name '*.jpg' -exec sha256sum{} \\; | sort | uniq -w64 -dD"}
{"instruction":"Find duplicate lines across multiple files","output":"sort * | uniq -d"}
{"instruction":"find empty files","output":"find . -type f -empty"}
{"instruction":"find files by date","output":"find . -mtime -7"}
{"instruction":"find files by size","output":"find . -size +1M"}
{"instruction":"Find files changed in git repository today","output":"git log --since='midnight' --name-only --oneline | grep -v '^[0-9a-f]\\+'"}
{"instruction":"Find files containing non-ASCII characters in their names","output":"find . -type f | grep --color='auto' -P '[^\\x00-\\x7F]'"}
{"instruction":"Find files containing 'password' but exclude certain directories","output":"grep -rnw --exclude-dir={dir1,dir2} -e 'password' ."}
{"instruction":"Find files containing specific text and replace it with something else","output":"find . -type f -exec grep -l 'oldtext'{} \\; | xargs sed -i 's/oldtext/newtext/g'"}
{"instruction":"Find files containing specific text pattern recursively","output":"find . -type f -exec grep -l 'pattern'{} \\;"}
{"instruction":"Find files larger than 100MB","output":"find . -type f -size +100M -exec ls -lh{} \\;"}
{"instruction":"Find files modified between two dates","output":"find . -type f -newermt '2024-01-01' ! -newermt '2024-01-31'"}
{"instruction":"Find files modified by specific user today","output":"find / -type f -user username -mtime 0 -ls"}
{"instruction":"Find files modified in last 24 hours and back them up with timestamp","output":"find . -mtime -1 -type f -exec cp{}{}.$(date +%Y%m%d_%H%M%S).backup \\;"}
{"instruction":"Find files older than 30 days and compress them","output":"find . -type f -mtime +30 -exec gzip{} \\;"}
{"instruction":"Find files that have grown over 1GB in last 24h","output":"find / -size +1G -mtime -1 -type f -exec ls -lh{} \\;"}
{"instruction":"Find files with a specific name using 'fd'","output":"fd filename"}
{"instruction":"Find files with dangerous permissions (777) and show their details","output":"find . -type f -perm 777 -exec ls -l{} \\;"}
{"instruction":"Find files with invalid UTF-8 encoding","output":"find . -type f -exec file{} \\; | grep -v 'UTF-8'"}
{"instruction":"Find files with names matching a pattern and delete them after confirmation","output":"find . -name 'pattern*' -type f -ok rm{} \\;"}
{"instruction":"Find files with names starting with 'test' and ending with '.sh'","output":"find . -type f -name 'test*.sh'"}
{"instruction":"Find files with non-ASCII characters in name","output":"find . -type f -name '*' -print0 | perl -n0e 'print \"$_\n\" if /[^[:ascii:]]/'"}
{"instruction":"Find files with specific permissions and change them","output":"find . -type f -perm 777 -exec chmod 644{} \\;"}
{"instruction":"Find files with Windows line endings and convert them to Unix format","output":"find . -type f -exec file{} \\; | grep 'CRLF' | cut -d: -f1 | xargs dos2unix"}
{"instruction":"Find files with Windows line endings and convert to Unix","output":"find . -type f -exec file{} \\; | grep CRLF | cut -d: -f1 | xargs dos2unix"}
{"instruction":"find large files over 100MB","output":"find . -size +100M"}
{"instruction":"Find large git objects and show their sizes","output":"git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -10 | awk '{print $1}' | git cat-file --batch-check='%(objectname) %(objecttype) %(objectsize) %(rest)'"}
{"instruction":"Find largest files in git history","output":"git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize)' | sort -k3nr | head -10"}
{"instruction":"Find largest git commits in repository history","output":"git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort -rn -k2 | head -10"}
{"instruction":"Find largest tables in PostgreSQL database","output":"psql -c 'SELECT nspname || '.' || relname AS relation, pg_size_pretty(pg_total_relation_size(C.oid)) AS total_size FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname NOT IN ('pg_catalog', 'information_schema') AND C.relkind <> 'i' AND nspname !~ '^pg_toast' ORDER BY pg_total_relation_size(C.oid) DESC LIMIT 10;'"}
{"instruction":"Find large temporary files older than 3 days","output":"find /tmp -type f -mtime +3 -size +100M -exec ls -lh{} \\;"}
{"instruction":"Find processes eating most disk I/O","output":"sudo iotop -o -b -n 1"}
{"instruction":"Find processes with most threads","output":"ps -eLf | awk '{print $2}' | sort | uniq -c | sort -nr | head"}
{"instruction":"Find processes with zombie children","output":"ps aux | awk '$8 ~ /Z/{print $2}'"}
{"instruction":"Find Python files modified in last week and count lines","output":"find . -name '*.py' -mtime -7 -type f -exec wc -l{} \\;"}
{"instruction":"Find recent failed cronjob entries","output":"grep CRON /var/log/syslog | grep -i failed | tail -n 20"}
{"instruction":"find text recursively","output":"grep -r 'text' ."}
{"instruction":"Find the 10 most recently modified files","output":"find . -type f -printf '%T@ %p\\n' | sort -n | tail -n 10 | awk '{print $2}'"}
{"instruction":"Find the top 5 most used commands from your history","output":"history | awk '{CMD[$2]++} END{for(a in CMD) print CMD[a], a}' | sort -rn | head -5"}
{"instruction":"flush DNS cache","output":"systemd-resolve --flush-caches"}
{"instruction":"force kill process","output":"kill -9{PID}"}
{"instruction":"Generate a GPG key pair","output":"gpg --full-generate-key"}
{"instruction":"Generate a list of installed packages and save to a file","output":"dpkg --get-selections > installed_packages.txt"}
{"instruction":"Generate an SSH key pair","output":"ssh-keygen -t rsa -b 4096 -C 'your_email@example.com'"}
{"instruction":"Generate a password hash for use with Apache htpasswd","output":"htpasswd -nb username password"}
{"instruction":"Generate a self-signed SSL certificate using 'openssl'","output":"openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.pem -out cert.pem"}
{"instruction":"Generate bandwidth usage report per IP","output":"tcpdump -nnn -r capture.pcap | awk '{print $3}' | cut -d. -f1,2,3,4 | sort | uniq -c | sort -nr"}
{"instruction":"Generate CPU load report for the last hour","output":"sar -u 1 3600"}
{"instruction":"Generate MD5 checksums for all files in a directory","output":"find . -type f -exec md5sum{} ; > checksums.md5"}
{"instruction":"Generate SSH key pair for authentication","output":"ssh-keygen -t rsa -b 4096"}
{"instruction":"Generate tags for code navigation using 'ctags'","output":"ctags -R ."}
{"instruction":"Generate tags for code navigation using 'exuberant-ctags'","output":"ctags -R ."}
{"instruction":"Get all URLs from a webpage","output":"curl -s http://example.com | grep -Eo 'https?://[^\"\\s]+'"}
{"instruction":"Get HTTP error distribution from last 1000 log entries","output":"tail -n 1000 access.log | cut -d '\"' -f3 | cut -d ' ' -f2 | sort | uniq -c | sort -rn"}
{"instruction":"Get list of recently crashed applications","output":"journalctl -p 3 -xb | grep -i crash"}
{"instruction":"Get list of recently modified git files with author","output":"git log --name-status --format='%h %ae %ar' HEAD~5..HEAD"}
{"instruction":"Get load average trends for the last hour","output":"sar -q 60 60"}
{"instruction":"Get simplified manual pages using 'tldr'","output":"tldr tar"}
{"instruction":"Get the status of all pods in a Kubernetes cluster","output":"kubectl get pods --all-namespaces"}
{"instruction":"Get web server response times from log files","output":"awk '{sum+=$NF; count++} END{print \"Average response time: \" sum/count \"s\"}' /var/log/nginx/access.log"}
{"instruction":"Identify processes using a specific file or directory using 'fuser'","output":"fuser -v /path/to/file_or_directory"}
{"instruction":"Initialize a Terraform working directory","output":"terraform init"}
{"instruction":"Install a Node.js package globally using 'npm'","output":"sudo npm install -g package_name"}
{"instruction":"Install a Python package globally using 'pip3'","output":"sudo pip3 install package_name"}
{"instruction":"Install a Python package using 'pip'","output":"pip install package_name"}
{"instruction":"Kill all processes named 'process_name'","output":"sudo killall process_name"}
{"instruction":"kill process by ID","output":"kill{PID}"}
{"instruction":"List all aliases defined in the current shell","output":"alias"}
{"instruction":"List all available disk devices and their UUIDs","output":"blkid"}
{"instruction":"List all connected USB devices","output":"lsusb"}
{"instruction":"List all environment variables starting with 'JAVA'","output":"printenv | grep '^JAVA'"}
{"instruction":"List all files accessed in the last hour","output":"find . -type f -amin -60"}
{"instruction":"List all files sorted by modification date, including subdirectories","output":"find . -type f -printf '%T+ %p\\n' | sort"}
{"instruction":"List all files sorted by size in descending order","output":"ls -lS"}
{"instruction":"List all files that are larger than 1GB and sort them by size","output":"find . -type f -size +1G -exec ls -lh{} \\; | sort -k5 -h"}
{"instruction":"List all installed Python packages","output":"pip list"}
{"instruction":"List all installed services and their statuses","output":"systemctl list-unit-files --type=service"}
{"instruction":"List all listening sockets using 'ss'","output":"ss -tulwn"}
{"instruction":"List all loaded kernel modules","output":"lsmod"}
{"instruction":"List all open files by a user","output":"sudo lsof -u username"}
{"instruction":"List all open network connections and their associated processes","output":"sudo lsof -i -P -n"}
{"instruction":"List all open network ports along with the processes using them","output":"sudo lsof -i -P -n | grep LISTEN"}
{"instruction":"List all processes and filter those consuming more than 50% CPU","output":"ps aux --sort=-%cpu | awk '$3>50.0{print $0}'"}
{"instruction":"List all running Docker containers and their resource usage","output":"docker stats --no-stream"}
{"instruction":"List all running Docker containers","output":"docker ps"}
{"instruction":"List all running processes sorted by memory usage","output":"ps aux --sort=-%mem"}
{"instruction":"List all S3 buckets in your AWS account","output":"aws s3 ls"}
{"instruction":"List all scheduled cron jobs for all users","output":"for user in $(cut -d: -f1 /etc/passwd); do echo -e \"\\n$user\"; crontab -u \"$user\" -l 2>/dev/null; done"}
{"instruction":"List all symbolic links pointing to nonexistent files","output":"find . -type l ! -exec test -e{} \\; -print"}
{"instruction":"List all users and their login shells","output":"cut -d: -f1,7 /etc/passwd"}
{"instruction":"List all users with a login shell of '/bin/false'","output":"grep '/bin/false' /etc/passwd | cut -d: -f1"}
{"instruction":"List open network sockets and their associated processes","output":"sudo netstat -tulpn"}
{"instruction":"make script executable","output":"chmod +x script.sh"}
{"instruction":"Monitor a command output every 2 seconds using 'watch'","output":"watch -n 2 'df -h'"}
{"instruction":"Monitor Apache requests per second in real time","output":"tail -f /var/log/apache2/access.log | awk '{print $4}' | uniq -c"}
{"instruction":"Monitor bandwidth usage with 'bmon'","output":"bmon"}
{"instruction":"Monitor changes to a directory in real time","output":"watch -d -n 2 'ls -l'"}
{"instruction":"Monitor CPU temperature in real time","output":"watch -n 1 sensors"}
{"instruction":"Monitor disk I/O in real time","output":"iostat -xz 1"}
{"instruction":"Monitor disk I/O usage per process using 'iotop'","output":"sudo iotop"}
{"instruction":"Monitor disk space and send an alert if usage exceeds 90%","output":"df -h | awk '$5 > 90{print}' | mail -s 'Disk Space Alert' admin@example.com"}
{"instruction":"Monitor disk space usage and send alert if over 90%","output":"df -h | awk '$5 > 90{print $0}' | mail -s 'Disk Space Alert' admin@example.com"}
{"instruction":"Monitor disk space usage every minute","output":"watch -n 60 df -h"}
{"instruction":"Monitor disk write operations in real-time","output":"iostat -dx 1 | grep -v '^$' | grep -v 'Device'"}
{"instruction":"Monitor failed SSH login attempts in real time","output":"tail -f /var/log/auth.log | grep --line-buffered 'Failed password'"}
{"instruction":"Monitor failed sudo attempts","output":"tail -f /var/log/auth.log | grep -i 'sudo.*failure'"}
{"instruction":"Monitor file changes in real time and log them","output":"inotifywait -m -r . -e modify,create,delete --format '%T %w%f %e' >> file_changes.log"}
{"instruction":"Monitor filesystem changes using inotify","output":"inotifywait -m /path/to/directory"}
{"instruction":"Monitor filesystem events on specific directory","output":"inotifywait -m -r /path --format '%w%f %e' --timefmt '%H:%M:%S'"}
{"instruction":"Monitor file system for unauthorized access attempts","output":"inotifywait -m -r /path/to/dir -e access,modify -e create,delete | grep -v 'ISDIR'"}
{"instruction":"Monitor HTTP traffic on port 80 using 'ngrep'","output":"sudo ngrep -d eth0 -W byline '^(GET|POST) ' tcp port 80"}
{"instruction":"Monitor MySQL replication lag","output":"mysql -e 'SHOW SLAVE STATUS\\G' | grep Seconds_Behind_Master"}
{"instruction":"Monitor MySQL slow queries in real time","output":"tail -f /var/log/mysql/mysql-slow.log | grep -A 5 'Query_time:'"}
{"instruction":"Monitor network bandwidth per connection using 'iftop'","output":"sudo iftop"}
{"instruction":"Monitor network bandwidth usage per process using 'nethogs'","output":"sudo nethogs"}
{"instruction":"Monitor network bandwidth usage with 'iftop'","output":"sudo iftop"}
{"instruction":"Monitor network connections and show counts by state","output":"watch -n1 'netstat -ant | awk \"{print \\$6}\" | sort | uniq -c | sort -n'"}
{"instruction":"Monitor network traffic by IP address","output":"tcpdump -nn -v | awk '{print $3}' | cut -d. -f1-4 | sort | uniq -c | sort -nr"}
{"instruction":"Monitor network traffic by port","output":"tcpdump -nn -v | awk '{print $3}' | cut -d. -f5 | sort | uniq -c | sort -nr"}
{"instruction":"Monitor network traffic in real time using 'iptraf'","output":"sudo iptraf"}
{"instruction":"Monitor network traffic per interface using 'iftop'","output":"sudo iftop -i eth0"}
{"instruction":"Monitor network traffic statistics using 'vnstat'","output":"vnstat"}
{"instruction":"Monitor PostgreSQL active connections","output":"watch -n 5 'psql -c \"SELECT count(*) FROM pg_stat_activity WHERE state = \\'active\\';\"'"}
{"instruction":"Monitor progress of data through a pipe using 'pv'","output":"pv input_file | gzip > output_file.gz"}
{"instruction":"Monitor rate of file creation in directory","output":"watch -n 1 'find . -type f | wc -l'"}
{"instruction":"Monitor real-time network bandwidth usage","output":"iftop"}
{"instruction":"Monitor real-time network bandwidth usage using 'iftop'","output":"sudo iftop"}
{"instruction":"Monitor real-time network bandwidth using 'nload'","output":"nload"}
{"instruction":"Monitor real-time network connections and their states","output":"watch -n 1 'ss -s'"}
{"instruction":"Monitor real-time network traffic per interface using 'iftop'","output":"sudo iftop -i eth0"}
{"instruction":"Monitor specific log file for errors in real time","output":"tail -f logfile.log | grep --line-buffered 'error'"}
{"instruction":"Monitor SSL certificate expiry dates for multiple domains","output":"for domain in $(cat domains.txt); do echo | openssl s_client -servername $domain -connect $domain:443 2>/dev/null | openssl x509 -noout -dates; done"}
{"instruction":"Monitor SSL handshake times","output":"openssl s_time -connect example.com:443 -new"}
{"instruction":"Monitor system load and memory every 5 seconds","output":"while true; do date; uptime; free -h; echo '---'; sleep 5; done"}
{"instruction":"Monitor system load and memory usage every 5 seconds","output":"watch -n 5 'echo \"Load: $(uptime | awk -F \"load average: \" \\'{print $2}\\')\"; free -h'"}
{"instruction":"Monitor system load and send alert if too high","output":"while true; do load=$(uptime | awk '{print $10}' | cut -d. -f1); if [ $load -gt 5 ]; then echo \"High load: $load at $(date)\" | mail -s 'High Load Alert' admin@example.com; fi; sleep 300; done"}
{"instruction":"Monitor system logs in real-time","output":"sudo tail -f /var/log/syslog"}
{"instruction":"Monitor system memory usage in real-time","output":"watch -n 1 free -h"}
{"instruction":"Monitor system metrics using 'glances'","output":"glances"}
{"instruction":"Monitor system performance using 'nmon'","output":"nmon"}
{"instruction":"Monitor system processes using 'htop'","output":"htop"}
{"instruction":"Monitor system processes with 'htop'","output":"htop"}
{"instruction":"Monitor the real-time output of multiple log files","output":"tail -f /var/log/syslog /var/log/auth.log"}
{"instruction":"Monitor wireless networks using 'aircrack-ng'","output":"sudo airodump-ng wlan0"}
{"instruction":"Mount an NFS share to a local directory","output":"sudo mount -t nfs server:/remote/share /local/mountpoint"}
{"instruction":"Mount a remote directory over SSH using 'sshfs'","output":"sshfs user@example.com:/remote/path /local/mountpoint"}
{"instruction":"move file.txt to documents","output":"mv file.txt documents/"}
{"instruction":"Parse and format JSON data using 'jq'","output":"cat data.json | jq '.'"}
{"instruction":"Parse and pretty-print a JSON file using 'jq'","output":"jq '.' file.json"}
{"instruction":"Perform a DNS lookup using 'dig'","output":"dig example.com"}
{"instruction":"Perform a WHOIS lookup for a domain","output":"whois example.com"}
{"instruction":"Perform network diagnostics using 'mtr'","output":"mtr example.com"}
{"instruction":"ping google.com","output":"ping google.com"}
{"instruction":"Pretty-print a JSON file using 'jq'","output":"jq '.' file.json"}
{"instruction":"Profile a program using 'perf'","output":"sudo perf record -g ./program"}
{"instruction":"Reattach to a detached 'screen' session","output":"screen -r session_name"}
{"instruction":"Recover data from a damaged disk using 'ddrescue'","output":"sudo ddrescue /dev/sdX /path/to/imagefile logfile"}
{"instruction":"Recursively change the ownership of a directory","output":"chown -R user:group /path/to/directory"}
{"instruction":"remove directory test","output":"rm -r test"}
{"instruction":"Replace all instances of 'foo' with 'bar' in all .txt files recursively","output":"find . -type f -name '*.txt' -exec sed -i 's/foo/bar/g'{} ;"}
{"instruction":"Replace all occurrences of 'foo' with 'bar' in all .txt files","output":"find . -name '*.txt' -type f -exec sed -i 's/foo/bar/g'{} \\;"}
{"instruction":"Replace all tabs with four spaces in all Python files","output":"find . -name '*.py' -type f -exec sed -i 's/\\t/ /g'{} \\;"}
{"instruction":"Replace spaces with underscores in all filenames in a directory","output":"rename 's/ /_/g' *"}
{"instruction":"Replace tabs with four spaces in all .py files","output":"find . -name '*.py' -type f -exec sed -i 's/\\t/ /g'{} \\;"}
{"instruction":"restart service","output":"systemctl restart service_name"}
{"instruction":"Restore a MySQL database from a compressed backup","output":"gunzip < database_name.sql.gz | mysql -u user -p database_name"}
{"instruction":"Run a Docker container in interactive mode with a specific image","output":"docker run -it image_name /bin/bash"}
{"instruction":"Run an Ansible ad-hoc command to ping all hosts","output":"ansible all -m ping -i inventory"}
{"instruction":"Run an Ansible playbook on a set of hosts","output":"ansible-playbook -i inventory.ini playbook.yml"}
{"instruction":"Run an internet speed test from the command line","output":"speedtest"}
{"instruction":"Run an internet speed test from the command line","output":"speedtest-cli"}
{"instruction":"Run 'htop' to monitor system processes","output":"htop"}
{"instruction":"Scan a host for open ports using 'nmap'","output":"nmap -sV example.com"}
{"instruction":"Scan a network for open SSH ports using 'nmap'","output":"nmap -p 22 --open -sV 192.168.1.0/24"}
{"instruction":"Scan the local network for active IP addresses using 'arp-scan'","output":"sudo arp-scan --localnet"}
{"instruction":"Scan the local network for devices using 'nmap'","output":"nmap -sn 192.168.1.0/24"}
{"instruction":"Scan your local network for active devices using 'nmap'","output":"nmap -sn 192.168.1.0/24"}
{"instruction":"Schedule a cron job to run a script every day at midnight","output":"echo '0 0 * * * /path/to/script.sh' | crontab -"}
{"instruction":"Search command history for commands containing 'ssh'","output":"history | grep ssh"}
{"instruction":"Search command history interactively using 'fzf'","output":"history | fzf"}
{"instruction":"Search for a pattern in files using 'ack'","output":"ack 'pattern' /path/to/search"}
{"instruction":"Search for a pattern in files using 'ripgrep'","output":"rg 'pattern' /path/to/search"}
{"instruction":"Search for a specific pattern in all .log files and display file names and line numbers","output":"grep -rnw 'pattern' --include='*.log' ."}
{"instruction":"Search for 'error' in all files excluding 'vendor' and 'node_modules' directories","output":"grep -rnw . -e 'error' --exclude-dir={vendor,node_modules}"}
{"instruction":"Search for lines that contain either 'error' or 'warning' in all log files","output":"find . -name '*.log' -type f -exec grep -iE 'error|warning'{} \\;"}
{"instruction":"Search for text 'error' in all log files","output":"find . -name '*.log' -type f -exec grep -l 'error'{} \\;"}
{"instruction":"search text in file","output":"grep 'text' file.txt"}
{"instruction":"Send a GET request to a URL using 'curl'","output":"curl -X GET https://api.example.com/data"}
{"instruction":"Send an email from the command line","output":"echo 'Email body' | mail -s 'Subject' recipient@example.com"}
{"instruction":"set environment variable","output":"export VAR=value"}
{"instruction":"set system time","output":"date -s '2024-01-01 12:00:00'"}
{"instruction":"Set the system timezone to 'UTC'","output":"sudo timedatectl set-timezone UTC"}
{"instruction":"Set up a simple chat server using 'ncat'","output":"ncat -l 5000"}
{"instruction":"Set up a simple TCP server listening on port 1234 using 'nc'","output":"nc -l 1234"}
{"instruction":"Show active network connections sorted by state","output":"netstat -nat | awk '{print $6}' | sort | uniq -c | sort -rn"}
{"instruction":"Show all active network interfaces and their IP addresses","output":"ip addr show | grep 'inet ' | awk '{print $2}'"}
{"instruction":"show all files including hidden ones","output":"ls -a"}
{"instruction":"Show all network bridges on the system","output":"brctl show"}
{"instruction":"show block devices","output":"lsblk"}
{"instruction":"show calendar for specific year","output":"cal 2024"}
{"instruction":"show calendar","output":"cal"}
{"instruction":"show command history","output":"history"}
{"instruction":"show CPU info","output":"cat /proc/cpuinfo"}
{"instruction":"show CPU temperature","output":"sensors"}
{"instruction":"Show CPU usage per Docker container","output":"docker stats --no-stream --format 'table{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}'"}
{"instruction":"show current directory path","output":"pwd"}
{"instruction":"show date and time","output":"date"}
{"instruction":"show directory sizes","output":"du -h"}
{"instruction":"Show disk I/O statistics every second","output":"iostat -x 1"}
{"instruction":"show disk I/O stats","output":"iostat"}
{"instruction":"show disk partition info","output":"fdisk -l"}
{"instruction":"show disk space usage","output":"df -h"}
{"instruction":"Show disk usage of current directory in human readable format","output":"du -h . | sort -hr"}
{"instruction":"show DNS info","output":"cat /etc/resolv.conf"}
{"instruction":"show environment variables","output":"env"}
{"instruction":"show failed logins","output":"lastb"}
{"instruction":"show file access times","output":"stat file"}
{"instruction":"show file content","output":"cat file.txt"}
{"instruction":"show file differences","output":"diff file1 file2"}
{"instruction":"show file handles","output":"lsof -p{PID}"}
{"instruction":"show file sizes in human readable format","output":"ls -lh"}
{"instruction":"show file type","output":"file filename"}
{"instruction":"show firewall rules","output":"iptables -L"}
{"instruction":"show first 10 lines of file","output":"head -n 10 file.txt"}
{"instruction":"show GPU info","output":"nvidia-smi"}
{"instruction":"Show histogram of log entries by hour","output":"awk '{print $4}' access.log | cut -c 14-15 | sort -n | uniq -c"}
{"instruction":"show IP address","output":"ip addr"}
{"instruction":"show kernel modules","output":"lsmod"}
{"instruction":"show kernel version","output":"uname -r"}
{"instruction":"show last 10 lines of file","output":"tail -n 10 file.txt"}
{"instruction":"show listening ports","output":"ss -tuln"}
{"instruction":"Show live count of HTTP response codes from nginx access log","output":"tail -f /var/log/nginx/access.log | awk '{print $9}' | sort | uniq -c | sort -rn"}
{"instruction":"show logged in users","output":"who"}
{"instruction":"show login attempts","output":"last"}
{"instruction":"Show memory page faults by process","output":"ps aux | awk '{print $2, $8, $11}' | sort -k2 -nr | head"}
{"instruction":"show memory stats","output":"vmstat"}
{"instruction":"Show memory usage of each process sorted by size","output":"ps aux --sort=-%mem | awk '{print $4,$11}' | head -n 10"}
{"instruction":"show me the list of files in this directory","output":"ls ."}
{"instruction":"show mounted filesystems","output":"mount"}
{"instruction":"Show MySQL queries taking longer than 1 second","output":"tail -f mysql-slow.log | awk '/Query_time/{if($3>1) print}'"}
{"instruction":"show my username","output":"whoami"}
{"instruction":"show network interfaces","output":"ifconfig"}
{"instruction":"Show network interfaces with high packet drops","output":"netstat -i | awk '$7>0 || $8>0{print $1, \"RX:\", $4, \"TX:\", $8}'"}
{"instruction":"show network statistics","output":"netstat -s"}
{"instruction":"show open files","output":"lsof"}
{"instruction":"show OS version","output":"cat /etc/os-release"}
{"instruction":"show PCI devices","output":"lspci"}
{"instruction":"Show processes accessing specific file","output":"lsof /path/to/file"}
{"instruction":"show processes by memory usage","output":"top"}
{"instruction":"Show processes consuming most CPU including child processes","output":"ps -eo pid,ppid,cmd,%cpu,%mem --sort=-%cpu | head"}
{"instruction":"Show processes using more than 10% CPU","output":"ps aux | awk 'NR>1 && $3>=10.0'"}
{"instruction":"Show processes using specific TCP port","output":"lsof -i tcp:80"}
{"instruction":"Show processes using swap memory","output":"for pid in $(ps -ef | awk '{print $2}'); do if [ -f /proc/$pid/status ]; then awk '/VmSwap|Name/{printf $2 \" \" $3}END{print \"\"}' /proc/$pid/status; fi done | sort -k 2 -n -r | head"}
{"instruction":"Show processes with most disk reads","output":"iotop -o -b -n 1 | grep -v Total | sort -k4 -nr | head"}
{"instruction":"Show processes with most disk writes","output":"iotop -o -b -n 1 | grep -v Total | sort -k6 -nr | head"}
{"instruction":"Show processes with most open files","output":"lsof -n | awk '{print $2}' | sort | uniq -c | sort -rn | head -10"}
{"instruction":"Show processes with most open network connections","output":"lsof -i | awk '{print $2}' | sort | uniq -c | sort -rn | head"}
{"instruction":"show process tree","output":"pstree"}
{"instruction":"Show programs listening on ports below 1024","output":"sudo lsof -i :1-1024 | grep LISTEN"}
{"instruction":"Show real-time CPU usage per core","output":"watch -n1 'grep \"^cpu\" /proc/stat | awk \"{print \\$1\\\" \"\\$2+\\$3+\\$4+\\$5+\\$6+\\$7+\\$8 \\\" \"\\$2\\\" \"\\$3\\\" \"\\$4\\\" \"\\$5\\\" \"\\$6\\\" \"\\$7\\\" \"\\$8}\"'"}
{"instruction":"Show real-time memory consumption change","output":"watch -n 1 'free -m | awk \"/^Mem/{print \\$3\\\"MB used,\\\" \\$4\\\"MB free,\\\" \\$6\\\"MB cached\\\"} \"'"}
{"instruction":"Show real-time network bandwidth by process","output":"nethogs"}
{"instruction":"show routing cache","output":"route -Cn"}
{"instruction":"show routing table","output":"route -n"}
{"instruction":"show running processes","output":"ps aux"}
{"instruction":"show scheduled tasks","output":"crontab -l"}
{"instruction":"show service status","output":"systemctl status service_name"}
{"instruction":"show shared memory","output":"ipcs"}
{"instruction":"show swap usage","output":"swapon --show"}
{"instruction":"Show system calls made by a specific process","output":"strace -p $(pgrep process_name)"}
{"instruction":"show systemd services","output":"systemctl list-units"}
{"instruction":"show system hostname","output":"hostname"}
{"instruction":"show system limits","output":"ulimit -a"}
{"instruction":"show system load average","output":"w"}
{"instruction":"show system logs","output":"tail -f /var/log/syslog"}
{"instruction":"show system memory usage","output":"free -h"}
{"instruction":"show system messages","output":"dmesg"}
{"instruction":"Show system uptime in a nice format","output":"uptime | awk '{print $3,$4}' | sed 's/,//'"}
{"instruction":"show system uptime","output":"uptime"}
{"instruction":"show system users","output":"cat /etc/passwd"}
{"instruction":"Show the 10 largest running processes by memory usage","output":"ps aux --sort=-%mem | head -n 11"}
{"instruction":"Show the 10 most CPU-intensive processes","output":"ps aux --sort=-%cpu | head -n 11"}
{"instruction":"Show the total disk usage of the current directory, excluding certain subdirectories","output":"du -sh --exclude='dir1' --exclude='dir2' ."}
{"instruction":"Show top 10 largest directories in the current path","output":"du -h --max-depth=1 | sort -hr | head -n 10"}
{"instruction":"Show top 10 largest files in directory tree","output":"find . -type f -print0 | xargs -0 du -h | sort -hr | head -n 10"}
{"instruction":"Show top 10 processes consuming most memory","output":"ps aux --sort=-%mem | head"}
{"instruction":"Show top memory consumers by process","output":"ps aux --sort=-%mem | head"}
{"instruction":"Show top memory consumers grouped by user","output":"ps aux | awk '{mem[$1] += $6} END{for (i in mem) print i, mem[i]}' | sort -nk2"}
{"instruction":"show USB devices","output":"lsusb"}
{"instruction":"show user groups","output":"cat /etc/group"}
{"instruction":"Show worker processes consuming most CPU","output":"ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10"}
{"instruction":"Start and enable 'fail2ban' service","output":"sudo systemctl start fail2ban && sudo systemctl enable fail2ban"}
{"instruction":"Start a new 'screen' session named 'session_name'","output":"screen -S session_name"}
{"instruction":"Start a new 'tmux' session named 'session_name'","output":"tmux new -s session_name"}
{"instruction":"Start an OpenVPN client with a configuration file","output":"sudo openvpn --config client.ovpn"}
{"instruction":"start service","output":"systemctl start service_name"}
{"instruction":"Start services defined in a 'docker-compose.yml' file","output":"docker-compose up -d"}
{"instruction":"Start the 'nginx' service","output":"sudo systemctl start nginx"}
{"instruction":"Start the Samba service","output":"sudo systemctl start smbd"}
{"instruction":"Stop and remove all Docker containers","output":"docker stop \\$(docker ps -aq) && docker rm \\$(docker ps -aq)"}
{"instruction":"stop service","output":"systemctl stop service_name"}
{"instruction":"Synchronize two directories using 'rsync'","output":"rsync -av --progress /source/directory/ /destination/directory/"}
{"instruction":"sync system time","output":"ntpdate pool.ntp.org"}
{"instruction":"Test connectivity to a port using 'telnet'","output":"telnet example.com 80"}
{"instruction":"Test connectivity to a remote host using 'telnet'","output":"telnet example.com 80"}
{"instruction":"Test if a remote port is open using 'telnet'","output":"telnet example.com 80"}
{"instruction":"Test internet connectivity by pinging Google's DNS server","output":"ping -c 4 8.8.8.8"}
{"instruction":"Test network bandwidth between two hosts using 'iperf3'","output":"iperf3 -c server_ip"}
{"instruction":"Test network bandwidth using 'iperf3'","output":"iperf3 -s # On server; iperf3 -c server_ip # On client"}
{"instruction":"test network connectivity","output":"ping -c 4 8.8.8.8"}
{"instruction":"Test the latency to multiple servers","output":"ping -c 4 google.com; ping -c 4 yahoo.com; ping -c 4 bing.com"}
{"instruction":"Trace library calls made by a program using 'ltrace'","output":"ltrace ./program"}
{"instruction":"trace network route","output":"traceroute google.com"}
{"instruction":"Trace system calls made by a command using 'strace'","output":"strace -o output.txt command"}
{"instruction":"Trace system calls made by a program using 'strace'","output":"strace ./program"}
{"instruction":"Trace the network route to a host","output":"traceroute example.com"}
{"instruction":"Trace the route to a host using 'traceroute'","output":"traceroute example.com"}
{"instruction":"Track file size changes over time","output":"while true; do ls -l targetfile | awk '{print strftime(\"%H:%M:%S\"), $5}'; sleep 10; done"}
{"instruction":"Transfer a file between two systems using 'nc'","output":"nc -l 1234 > received.file; On sender: nc receiver_ip 1234 < file_to_send"}
{"instruction":"Transfer a file between two systems using 'nc'","output":"On receiver: nc -l 1234 > received.file; On sender: nc receiver_ip 1234 < file_to_send"}
{"instruction":"Unzip all .zip files in the current directory","output":"for file in *.zip; do unzip \"$file\"; done"}
{"instruction":"Update file database for 'locate' command","output":"sudo updatedb"}
{"instruction":"Use 'bat' to view a file with syntax highlighting","output":"batcat file.txt"}
{"instruction":"Use 'exa' as an alternative to 'ls'","output":"exa -la"}
{"instruction":"Use 'fzf' to interactively search files and directories","output":"fzf"}
{"instruction":"Verify MD5 checksums of files using a checksum file","output":"md5sum -c checksums.md5"}
{"instruction":"View colored log output using 'ccze'","output":"tail -f /var/log/syslog | ccze"}
{"instruction":"View differences between files with color using 'colordiff'","output":"colordiff file1.txt file2.txt"}
{"instruction": "Merge multiple JSON files", "output": "jq -s '.' file1.json file2.json > merged.json"}
{"instruction": "Show all active network interfaces", "output": "ip link show up"}
{"instruction": "Monitor network packets on specific port", "output": "tcpdump -i any port 80"}
{"instruction": "Show network interface statistics", "output": "ip -s link"}
{"instruction": "Display routing table in detail", "output": "ip route show table all"}
{"instruction": "Show network interface queue statistics", "output": "tc -s qdisc show"}
{"instruction": "Find files modified in git repository today", "output": "git log --since=midnight --name-only --oneline"}
{"instruction": "Show git branch creation date", "output": "git show --no-patch --no-notes --pretty='%ai' branch_name"}
{"instruction": "Find largest files in git history", "output": "git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | awk '$1 == \"blob\"{print $3, $4}' | sort -nr | head -10"}
{"instruction": "Remove file from git history", "output": "git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch path/to/file' --prune-empty --tag-name-filter cat -- --all"}
{"instruction": "Show commits by author", "output": "git log --author=\"username\" --pretty=format:\"%h - %an, %ar : %s\""}
{"instruction": "Create SSH key with specific algorithm", "output": "ssh-keygen -t ed25519 -C \"your_email@example.com\""}
{"instruction": "Show SSH client configuration", "output": "cat ~/.ssh/config"}
{"instruction": "Test SSH connection without logging in", "output": "ssh -T user@hostname"}
{"instruction": "Forward local port through SSH tunnel", "output": "ssh -L 8080:localhost:80 user@remote_host"}
{"instruction": "Create persistent SSH connection", "output": "ssh -o ServerAliveInterval=60 user@host"}
{"instruction": "Extract audio from video file", "output": "ffmpeg -i video.mp4 -vn -acodec copy audio.aac"}
{"instruction": "Convert video codec without re-encoding audio", "output": "ffmpeg -i input.mp4 -c:v libx264 -c:a copy output.mp4"}
{"instruction": "Create video thumbnail", "output": "ffmpeg -i video.mp4 -ss 00:00:01.000 -vframes 1 thumb.jpg"}
{"instruction": "Add subtitles to video", "output": "ffmpeg -i video.mp4 -i subtitles.srt -c copy -c:s mov_text output.mp4"}
{"instruction": "Compress video maintaining quality", "output": "ffmpeg -i input.mp4 -vcodec libx264 -crf 23 output.mp4"}
{"instruction": "List all available package versions", "output": "apt-cache madison package_name"}
{"instruction": "Show package dependencies", "output": "apt-cache depends package_name"}
{"instruction": "Find which package provides a file", "output": "dpkg -S /path/to/file"}
{"instruction": "Show package installation status", "output": "dpkg -l | grep package_name"}
{"instruction": "Clean package cache", "output": "apt-get clean && apt-get autoclean"}
{"instruction": "Start Wireshark capture as non-root", "output": "wireshark -k -i any"}
{"instruction": "Run network vulnerability scan", "output": "nmap -sV --script vuln target_host"}
{"instruction": "Create wordlist from website", "output": "cewl -d 2 -m 5 -w wordlist.txt http://example.com"}
{"instruction": "Monitor wireless networks", "output": "airodump-ng wlan0mon"}
{"instruction": "Hash cracking with John the Ripper", "output": "john --wordlist=wordlist.txt hashes.txt"}
{"instruction": "Show all Bluetooth devices", "output": "bluetoothctl devices"}
{"instruction": "Show CPU architecture details", "output": "lscpu | grep 'Architecture\\|Model name\\|CPU(s)'"}
{"instruction": "Display system BIOS information", "output": "sudo dmidecode -t bios"}
{"instruction": "Show GPU driver version", "output": "nvidia-smi --query-gpu=driver_version --format=csv,noheader"}
{"instruction": "Display USB device tree", "output": "lsusb -t"}
{"instruction": "Show system power management capabilities", "output": "cat /sys/power/state"}
{"instruction": "Hibernate the system", "output": "systemctl hibernate"}
{"instruction": "Set system to reboot at specific time", "output": "echo 'shutdown -r' | at 23:00"}
{"instruction": "Cancel scheduled shutdown", "output": "shutdown -c"}
{"instruction": "Put system in maintenance mode", "output": "systemctl isolate rescue.target"}
{"instruction": "Create a new group with specific GID", "output": "groupadd -g 1500 newgroup"}
{"instruction": "Lock user account", "output": "passwd -l username"}
{"instruction": "Show all users with sudo privileges", "output": "getent group sudo | cut -d: -f4"}
{"instruction": "Set user account expiry date", "output": "usermod -e 2024-12-31 username"}
{"instruction": "Force user to change password at next login", "output": "chage -d 0 username"}
{"instruction": "Find files with broken ACL", "output": "getfacl -R / 2>/dev/null | grep -B1 'Permission denied'"}
{"instruction": "Show files accessed in last hour recursively", "output": "find . -type f -amin -60 -ls"}
{"instruction": "Create file with specific timestamp", "output": "touch -t 202401011200 filename"}
{"instruction": "Find files with specific extension and compress them", "output": "find . -name '*.log' -exec gzip{} \\;"}
{"instruction": "Batch rename files with regex", "output": "rename 's/\\.jpeg$/.jpg/' *.jpeg"}
{"instruction": "Copy text from terminal to clipboard", "output": "echo 'text' | xclip -selection clipboard"}
{"instruction": "Read clipboard content", "output": "xclip -selection clipboard -o"}
{"instruction": "Monitor keyboard input events", "output": "sudo showkey -a"}
{"instruction": "Clear clipboard contents", "output": "echo -n '' | xclip -selection clipboard"}
{"instruction": "Record terminal session", "output": "script terminal_session.log"}
{"instruction": "Convert JSON to YAML", "output": "python3 -c 'import sys, yaml, json; print(yaml.dump(json.load(sys.stdin)))'"}
{"instruction": "Extract specific JSON field recursively", "output": "jq '.. | .field? | select(. != null)'"}
{"instruction": "Validate JSON file", "output": "jq 'empty' file.json"}
{"instruction": "Show motherboard model", "output": "dmidecode -t 2 | grep -i product"}
{"instruction": "Display RAM timing information", "output": "sudo dmidecode -t memory | grep -i speed"}
{"instruction": "Show TPM status", "output": "tpm2_getcap -l"}
{"instruction": "Display battery health status", "output": "upower -i /org/freedesktop/UPower/devices/battery_BAT0"}
{"instruction": "Show CPU frequency scaling governor", "output": "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"}
{"instruction": "Display all PCI Express devices", "output": "lspci -vv | grep -A 10 'Express'"}
{"instruction": "Show disk read-ahead value", "output": "blockdev --getra /dev/sda"}
{"instruction": "Display NUMA node information", "output": "numactl --hardware"}
{"instruction": "Show system interrupt statistics", "output": "cat /proc/interrupts"}
{"instruction": "Display active kernel parameters", "output": "sysctl -a"}
{"instruction": "Set CPU performance mode", "output": "echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor"}
{"instruction": "Enable power saving for USB devices", "output": "echo auto | sudo tee /sys/bus/usb/devices/*/power/control"}
{"instruction": "Schedule system wake from suspend", "output": "echo 0 | sudo tee /sys/class/rtc/rtc0/wakealarm && echo $(date '+%s' -d '+ 8 hours') | sudo tee /sys/class/rtc/rtc0/wakealarm"}
{"instruction": "Set disk I/O scheduler", "output": "echo deadline | sudo tee /sys/block/sda/queue/scheduler"}
{"instruction": "Enable SysRq key", "output": "echo 1 | sudo tee /proc/sys/kernel/sysrq"}
{"instruction": "Create user with specific login shell", "output": "useradd -s /bin/zsh -m username"}
{"instruction": "Set user process priority limits", "output": "echo 'username hard nice -5' | sudo tee -a /etc/security/limits.conf"}
{"instruction": "Add user to multiple groups", "output": "usermod -aG group1,group2,group3 username"}
{"instruction": "Show user resource limits", "output": "ulimit -a"}
{"instruction": "Set maximum number of user processes", "output": "ulimit -u 5000"}
{"instruction": "Find files with specific extended attributes", "output": "find / -xattr -exec getfattr -d{} \\;"}
{"instruction": "Create sparse file of specific size", "output": "truncate -s 1G sparsefile"}
{"instruction": "Find files with duplicate content ignoring name", "output": "find . -type f -exec md5sum{} \\; | sort | uniq -w32 -dD"}
{"instruction": "Set file timestamp to match another file", "output": "touch -r reference_file target_file"}
{"instruction": "Find files with specific capability set", "output": "getcap -r / 2>/dev/null"}
{"instruction": "Paste clipboard content to specific line in file", "output": "xclip -selection clipboard -o | sed -i '5r /dev/stdin' file.txt"}
{"instruction": "Copy file content to primary selection", "output": "xclip -selection primary file.txt"}
{"instruction": "Monitor X11 events", "output": "xev"}
{"instruction": "Record mouse clicks and keyboard input", "output": "xnee --record --mouse --keyboard --out-file events.xnee"}
{"instruction": "Show clipboard managers", "output": "ps aux | grep -i clip"}
{"instruction": "Convert JSON to XML", "output": "python3 -c 'import json,sys,xmltodict; print(xmltodict.unparse({\"root\":json.load(sys.stdin)}))"}
{"instruction": "Find null values in JSON", "output": "jq 'paths as $p | select(getpath($p) == null) | $p | join(\".\")"}
{"instruction": "Compare two JSON files", "output": "diff <(jq -S . file1.json) <(jq -S . file2.json)"}
{"instruction": "Extract nested JSON array", "output": "jq '.field[].subfield[]'"}
{"instruction": "Convert JSON to line-delimited format", "output": "jq -c '.[]' file.json"}
{"instruction": "Show network interface ring buffer size", "output": "ethtool -g eth0"}
{"instruction": "Display network interface offload settings", "output": "ethtool -k eth0"}
{"instruction": "Show network interface driver information", "output": "ethtool -i eth0"}
{"instruction": "Display network interface wake-on-lan status", "output": "ethtool eth0 | grep Wake-on"}
{"instruction": "Show network interface pause frame settings", "output": "ethtool -a eth0"}
{"instruction": "Find commits touching specific function", "output": "git log -L :function_name:file.c"}
{"instruction": "Show commit history for specific lines", "output": "git log -L10,20:file.txt"}
{"instruction": "Find first commit that introduced a string", "output": "git log -S 'string' --source --all"}
{"instruction": "Show commits that moved a file", "output": "git log --follow --name-status -- file.txt"}
{"instruction": "Find commits between two tags", "output": "git log tag1..tag2 --oneline"}
{"instruction": "Generate SSH key with custom comment", "output": "ssh-keygen -t rsa -b 4096 -C 'custom comment'"}
{"instruction": "Create SSH key with specific output file", "output": "ssh-keygen -t ed25519 -f ~/.ssh/custom_key"}
{"instruction": "Show SSH key fingerprint", "output": "ssh-keygen -lf ~/.ssh/id_rsa.pub"}
{"instruction": "Change SSH key passphrase", "output": "ssh-keygen -p -f ~/.ssh/id_rsa"}
{"instruction": "Convert SSH key format", "output": "ssh-keygen -e -f ~/.ssh/id_rsa > openssh_key"}
{"instruction": "Adjust video playback speed", "output": "ffmpeg -i input.mp4 -filter:v \"setpts=0.5*PTS\" output.mp4"}
{"instruction": "Extract specific video segment", "output": "ffmpeg -i input.mp4 -ss 00:01:00 -t 00:02:00 -c copy output.mp4"}
{"instruction": "Convert video to animated GIF", "output": "ffmpeg -i input.mp4 -vf \"fps=10,scale=320:-1\" output.gif"}
{"instruction": "Add watermark to video", "output": "ffmpeg -i input.mp4 -i watermark.png -filter_complex 'overlay=10:10' output.mp4"
}
{"instruction": "Combine multiple videos", "output": "ffmpeg -f concat -i list.txt -c copy output.mp4"}
{"instruction": "List available package architectures","output": "dpkg --print-architecture && dpkg --print-foreign-architectures"}
{"instruction": "Show package installation size","output": "apt-cache show package_name | grep 'Size'"}
{"instruction": "Find reverse package dependencies","output": "apt-cache rdepends package_name"}
{"instruction": "Show package version policy","output": "apt-cache policy package_name"}
{"instruction": "List manually installed packages","output": "apt-mark showmanual"}
{"instruction": "Set up wireless network monitor mode","output": "airmon-ng start wlan0"}
{"instruction": "Analyze HTTP traffic with bettercap","output": "sudo bettercap -iface eth0"}
{"instruction": "Scan for SQL injection vulnerabilities","output": "sqlmap -u 'http://example.com/?id=1'"}
{"instruction": "Perform DNS enumeration","output": "dnsrecon -d example.com"}
{"instruction": "Test SSL/TLS configuration","output": "sslyze --regular example.com"}
{"instruction": "Run the last command as root", "output": "sudo !!"}
{"instruction": "Serve current directory tree at http://$HOSTNAME:8000/", "output": "python -m SimpleHTTPServer"}
{"instruction": "Runs previous command but replacing", "output": "^foo^bar"}
{"instruction": "Rapidly invoke an editor to write a long, complex, or tricky command", "output": "ctrl-x e"}
{"instruction": "Place the argument of the most recent command on the shell", "output": "'ALT+.' or '<ESC> .'"}
{"instruction": "currently mounted filesystems in nice layout", "output": "mount | column -t"}
{"instruction": "Salvage a borked terminal", "output": "reset"}
{"instruction": "Get your external IP address", "output": "curl ifconfig.me"}
{"instruction": "Execute a command at a given time", "output": "echo \"ls -l\" | at midnight"}
{"instruction": "Quick access to the ascii table.", "output": "man ascii"}
{"instruction": "output your microphone to a remote computer's speaker", "output": "dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp"}
{"instruction": "type partial command, kill this command, check something you forgot, yank the command, resume typing.", "output": "<ctrl+u> [...] <ctrl+y>"}
{"instruction": "Query Wikipedia via console over DNS", "output": "dig +short txt <keyword>.wp.dg.cx"}
{"instruction": "Mount folder/filesystem through SSH", "output": "sshfs name@server:/path/to/folder /path/to/mount/point"}
{"instruction": "Mount a temporary ram partition", "output": "mount -t tmpfs tmpfs /mnt -o size=1024m"}
{"instruction": "Download an entire website", "output": "wget --random-wait -r -p -e robots=off -U mozilla http://www.example.com"}
{"instruction": "Clear the terminal screen", "output": "ctrl-l"}
{"instruction": "Compare a remote file with a local file", "output": "ssh user@host cat /path/to/remotefile | diff /path/to/localfile -"}
{"instruction": "SSH connection through host in the middle", "output": "ssh -t reachable_host ssh unreachable_host"}
{"instruction": "Update twitter via curl", "output": "curl -u user:pass -d status=\"Tweeting from the shell\" http://twitter.com/statuses/update.xml"}
{"instruction": "A very simple and useful stopwatch", "output": "time read (ctrl-d to stop)"}
{"instruction": "Put a console clock in top right corner", "output": "while sleep 1;do tput sc; tput cup 0 $(($( tput cols)-29));date; tput rc;done &"}
{"instruction": "Make 'less' behave like 'tail -f'.", "output": "less +F somelogfile"}
{"instruction": "Close shell keeping all subprocess running", "output": "disown -a && exit"}
{"instruction": "Watch Star Wars via telnet", "output": "telnet towel.blinkenlights.nl"}
{"instruction": "32 bits or 64 bits?", "output": "getconf LONG_BIT"}
{"instruction": "List of commands you use most often", "output": "history | awk '{a[$2]++}END{for(i in a){print a[i] \" \" i}}' | sort -rn | head"}
{"instruction": "Simulate typing", "output": "echo \"You can simulate on-screen typing just like in the movies\" | pv -qL 10"}
{"instruction": "Set audible alarm when an IP address comes online", "output": "ping -i 60 -a IP_address"}
{"instruction": "Reboot machine when everything is hanging", "output": "<alt> + <print screen/sys rq> + <R> - <S> - <E> - <I> - <U> - <B>"}
{"instruction": "quickly rename a file", "output": "mv filename.{old,new}"}
{"instruction": "Display the top ten running processes - sorted by memory usage", "output": "ps aux | sort -nk +4 | tail"}
{"instruction": "Delete all files in a folder that don't match a certain file extension", "output": "rm !(*.foo|*.bar|*.baz)"}
{"instruction": "Push your present working directory to a stack that you can pop later", "output": "pushd /tmp"}
{"instruction": "Create a script of the last executed command", "output": "echo \"!!\" > foo.sh"}
{"instruction": "Watch Network Service Activity in Real-time", "output": "lsof -i"}
{"instruction": "Easy and fast access to often executed commands that are very long and complex.", "output": "some_very_long_and_complex_command # label"}
{"instruction": "escape any command aliases", "output": "\\[command]"}
{"instruction": "Show apps that use internet connection at the moment. (Multi-Language)", "output": "lsof -P -i -n"}
{"instruction": "diff two unsorted files without creating temporary files", "output": "diff <(sort file1) <(sort file2)"}
{"instruction": "Reuse all parameter of the previous command line", "output": "!*"}
{"instruction": "Backticks are evil", "output": "echo \"The date is: $( date +%D)\""}
{"instruction": "Sharing file through http 80 port", "output": "nc -v -l 80 < file.ext"}
{"instruction": "Show File System Hierarchy", "output": "man hier"}
{"instruction": "Display a block of text with AWK", "output": "awk '/start_pattern/,/stop_pattern/' file.txt"}
{"instruction": "Set CDPATH to ease navigation", "output": "CDPATH=:..:~:~/projects"}
{"instruction": "save command output to image", "output": "ifconfig | convert label:@- ip.png"}
{"instruction": "Add Password Protection to a file your editing in vim.", "output": "vim -x <FILENAME>"}
{"instruction": "Remove duplicate entries in a file without sorting.", "output": "awk '!x[$0]++' <file>"}
{"instruction": "Copy your SSH public key on a remote machine for passwordless login - the easy way", "output": "ssh-copy-id username@hostname"}
{"instruction": "Find Duplicate Files (based on size first, then MD5 hash)", "output": "find -not -empty -type f -printf \"%s"}
{"instruction": "Kills a process that is locking a file.", "output": "fuser -k filename"}
{"instruction": "Insert the last command without the last argument (bash)", "output": "!:-"}
{"instruction": "python smtp server", "output": "python -m smtpd -n -c DebuggingServer localhost:1025"}
{"instruction": "Display which distro is installed", "output": "cat /etc/issue"}
{"instruction": "Find the process you are looking for minus the grepped one", "output": "ps aux | grep [p]rocess-name"}
{"instruction": "Extract tarball from internet without local saving", "output": "wget -qO - \"http://www. tarball.com/ tarball.gz\" | tar zxvf -"}
{"instruction": "Copy your ssh public key to a server from a machine that doesn't have ssh-copy-id", "output": "cat ~/. ssh/id_rsa.pub | ssh user@machine \"mkdir ~/. ssh; cat >> ~/. ssh/authorized_keys\""}
{"instruction": "Matrix Style", "output": "tr -c \"[:digit:]\" \" \" < /dev/urandom | dd cbs=$COLUMNS conv=unblock | GREP_COLOR=\"1;32\" grep --color \"[^ ]\""}
{"instruction": "replace spaces in filenames with underscores", "output": "rename 'y/ /_/' *"}
{"instruction": "Rip audio from a video file.", "output": "mplayer -ao pcm -vo null -vc dummy -dumpaudio -dumpfile <output-file> <input-file>"}
{"instruction": "Google Translate", "output": "translate(){ wget -qO- \"http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=$1&langpair=$2|${3:-en}\" | sed 's/.*\"translatedText\":\"\\([^\"]*\\)\".*}/\\1"}
{"instruction": "Inserts the results of an autocompletion in the command line", "output": "ESC *"}
{"instruction": "Rapidly invoke an editor to write a long, complex, or tricky command", "output": "fc"}
{"instruction": "A fun thing to do with ram is actually open it up and take a peek. This command will show you all the string (plain text) values in ram", "output": "sudo dd if=/dev/mem | cat | strings"}
{"instruction": "Graphical tree of sub-directories", "output": "ls -R | grep \":$\" | sed -e 's/:$//' -e 's/[^-][^\\/]*\\//--/g' -e 's/^/ /' -e 's/-/|/'"}
{"instruction": "intercept stdout/stderr of another process", "output": "strace -ff -e trace=write -e write=1,2 -p SOME_PID"}
{"instruction": "Copy a file using pv and watch its progress", "output": "pv sourcefile > destfile"}
{"instruction": "Define a quick calculator function", "output": "? (){ echo \"$*\" | bc -l; }"}
{"instruction": "Create a CD/DVD ISO image from disk.", "output": "readom dev=/dev/scd0 f=/path/to/image.iso"}
{"instruction": "mkdir & cd into it as single command", "output": "mkdir /home/foo/doc/bar && cd $_"}
{"instruction": "Create a pdf version of a manpage", "output": "man -t manpage | ps2pdf - filename.pdf"}
{"instruction": "Stream YouTube URL directly to mplayer.", "output": "i=\"8uyxVmdaJ-w\";mplayer -fs $(curl -s \"http://www.youtube.com/get_video_info?&video_id=$i\" | echo -e $(sed 's/%/\\\\x/g;s/.*\\(v[0-9]\\.lscache.*\\)/http:\\/\\/\\1/g') | grep -oP '^[^|,]*')"}
{"instruction": "Make directory including intermediate directories", "output": "mkdir -p a/long/directory/path"}
{"instruction": "Easily search running processes (alias).", "output": "alias 'ps?'='ps ax | grep '"}
{"instruction": "Multiple variable assignments from command output in BASH", "output": "read day month year <<< $(date +'%d %m %y')"}
{"instruction": "Remove all but one specific file", "output": "rm -f !(survivior.txt)"}
{"instruction": "git remove files which have been deleted", "output": "git add -u"}
{"instruction": "Edit a file on a remote host using vim", "output": "vim scp://username@host//path/to/somefile"}
{"instruction": "Job Control", "output": "^Z $bg $disown"}
{"instruction": "Generate a random password 30 characters long", "output": "s trings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '"}
{"instruction": "Show apps that use internet connection at the moment. (Multi-Language)", "output": "ss -p"}
{"instruction": "Graph # of connections for each hosts.", "output": "netstat -an | grep ESTABLISHED | awk '{ print $5}' | awk -F: '{ print $1}' | sort | uniq -c | awk '{ printf(\"%s\\t%s\\t\",$2,$1) ; for (i = 0; i < $1; i++){ printf(\"*\")}; print \"\" }'"}
{"instruction": "Record a screencast and convert it to an mpeg", "output": "ffmpeg -f x11grab -r 25 -s 800x600 -i :0.0 /tmp/outputFile.mpg"}
{"instruction": "Monitor progress of a command", "output": "pv access.log | gzip > access.log.gz"}
{"instruction": "Search for a <pattern> string inside all files in the current directory", "output": "grep -RnisI <pattern> *"}
{"instruction": "Monitor the queries being run by MySQL", "output": "watch -n 1 mysqladmin --user=<user> --password=<password> processlist"}
{"instruction": "Get the 10 biggest files/folders for the current direcotry", "output": "du -s * | sort -n | tail"}
{"instruction": "Show numerical values for each of the 256 colors in bash", "output": "for code in{0..255}; do echo -e \"\\e[38;05;${ code}m $ code: Test\"; done"}
{"instruction": "Recursively remove all empty directories", "output": "find . -type d -empty -delete"}
{"instruction": "Display a cool clock on your terminal", "output": "watch -t -n1 \"date +%T|figlet\""}
{"instruction": "Convert seconds to human-readable format", "output": "date -d@1234567890"}
{"instruction": "Nice weather forecast on your shell", "output": "curl wttr.in/seville"}
{"instruction": "Check your unread Gmail from the command line", "output": "curl -u username:password --silent \"https://mail.google.com/mail/feed/atom\" | tr -d '"}
{"instruction": "Search commandlinefu.com from the command line using the API", "output": "cmdfu(){ curl \"http://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext\"; }"}
{"instruction": "Processor / memory bandwidthd? in GB/s", "output": "dd if=/dev/zero of=/dev/null bs=1M count=32768"}
{"instruction": "pretend to be busy in office to enjoy a cup of coffee", "output": "cat /dev/urandom | hexdump -C | grep \"ca fe\""}
{"instruction": "Makes the permissions of file2 the same as file1", "output": "chmod --reference file1 file2"}
{"instruction": "Remove security limitations from PDF documents using ghostscript", "output": "gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=OUTPUT.pdf -c .setpdfwrite -f INPUT.pdf"}
{"instruction": "Send pop-up notifications on Gnome", "output": "notify-send [\"<title>\"] \"<body>\""}
{"instruction": "(Debian/Ubuntu) Discover what package a file belongs to", "output": "dpkg -S /usr/bin/ls"}
{"instruction": "Mount a .iso file in UNIX/Linux", "output": "mount /path/to/file.iso /mnt/cdrom -oloop"}
{"instruction": "Remove a line in a text file. Useful to fix", "output": "ssh-keygen -R <the_offending_host>"}
{"instruction": "To print a specific line from a file", "output": "sed -n 5p <file>"}
{"instruction": "Open Finder from the current Terminal location", "output": "open ."}
{"instruction": "Create a persistent connection to a machine", "output": "ssh -MNf <user>@<host>"}
{"instruction": "Run a command only when load average is below a certain threshold", "output": "echo \"rm -rf /unwanted-but-large/folder\" | batch"}
{"instruction": "Create a quick back-up copy of a file", "output": "cp file.txt{,.bak}"}
{"instruction": "Start COMMAND, and kill it if still running after 5 seconds", "output": "timeout 5s COMMAND"}
{"instruction": "Attach screen over ssh", "output": "ssh -t remote_host screen -r"}
{"instruction": "Show a 4-way scrollable process tree with full details.", "output": "ps awwfux | less -S"}
{"instruction": "List all bash shortcuts", "output": "bind -P"}
{"instruction": "RTFM function", "output": "rtfm(){ help $@ || man $@ || $BROWSER \"http://www.google.com/search?q=$@\"; }"}
{"instruction": "Eavesdrop on your system", "output": "diff <( lsof -p 1234) <(sleep 10; lsof -p 1234)"}
{"instruction": "Remove all files previously extracted from a tar(.gz) file.", "output": "tar -tf <file. tar.gz> | xargs rm -r"}
{"instruction": "Broadcast your shell thru ports 5000, 5001, 5002 ...", "output": "script -qf | tee >(nc -kl 5000) >(nc -kl 5001) >(nc -kl 5002)"}
{"instruction": "directly ssh to host B that is only accessible through host A", "output": "ssh -t hostA ssh hostB"}
{"instruction": "which program is this port belongs to ?", "output": "lsof -i tcp:80"}
{"instruction": "What is my public IP-address?", "output": "curl ifconfig.me"}
{"instruction": "Retry the previous command until it exits successfully", "output": "until !!; do :; done"}
{"instruction": "Synchronize date and time with a server over ssh", "output": "date --set=\"$(ssh user@server date)\""}
{"instruction": "Edit a google doc with vim", "output": "google docs edit --title \"To-Do List\" -- editor vim"}
{"instruction": "Run a file system check on your next boot.", "output": "sudo touch /forcefsck"}
{"instruction": "List only the directories", "output": "ls -d */"}
{"instruction": "Share a terminal screen with others", "output": "% screen -r someuser/"}
{"instruction": "Google text-to-speech in mp3 format", "output": "wget -q -U Mozilla -O output.mp3 \"http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"}
{"instruction": "Download all images from a site", "output": "wget -r -l1 --no-parent -nH -nd -P/tmp -A\".gif,.jpg\" http://example.com/images"}
{"instruction": "Download Youtube video with wget!", "output": "wget http://www.youtube.com/watch?v=dQw4w9WgXcQ -qO- | sed -n \"/fmt_url_map/{s/[\\'\\\"\\|]/"}
{"instruction": "Python version 3: Serve current directory tree at http://$HOSTNAME:8000/", "output": "python -m http.server"}
{"instruction": "Get your outgoing IP address", "output": "dig +short myip.opendns.com @resolver1.opendns.com"}
{"instruction": "Binary Clock", "output": "watch -n 1 'echo \"obase=2;`date +%s`\" | bc'"}
{"instruction": "Sort the size usage of a directory tree by gigabytes, kilobytes, megabytes, then bytes.", "output": "du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf \"%.1f%s\", $1>=2**30? ($1/2**30, \"G\"): $1>=2**20? ($1/2**20, \"M\"): $1>=2**10? ($1/2**10, \"K\"): ($1, \"\")}e'"}
{"instruction": "Duplicate installed packages from one machine to the other (RPM-based systems)", "output": "ssh root@remote.host \"rpm -qa\" | xargs yum -y install"}
{"instruction": "Draw kernel module dependancy graph.", "output": "lsmod | perl -e ' print \"digraph \\\" lsmod\\\"{\";<>;while(<>){@_=split/\\s+/; print \"\\\"$_[0]\\\" -> \\\"$_\\\""}
{"instruction": "Compare two directory trees.", "output": "diff <(cd dir1 && find | sort) <(cd dir2 && find | sort)"}
{"instruction": "Bring the word under the cursor on the :ex line in Vim", "output": ":<C-R><C-W>"}
{"instruction": "Remind yourself to leave in 15 minutes", "output": "leave +15"}
{"instruction": "make directory tree", "output": "mkdir -p work/{d1,d2}/{src,bin,bak}"}
{"instruction": "Convert Youtube videos to MP3", "output": "youtube-dl -t --extract-audio --audio-format mp3 YOUTUBE_URL_HERE"}
{"instruction": "Find out how much data is waiting to be written to disk", "output": "grep ^Dirty /proc/meminfo"}
{"instruction": "Use tee to process a pipe with two or more processes", "output": "echo \"tee can split a pipe in two\"|tee >(rev) >(tr ' ' '_')"}
{"instruction": "Show apps that use internet connection at the moment.", "output": "lsof -P -i -n | cut -f 1 -d \" \"| uniq | tail -n +2"}
{"instruction": "Backup all MySQL Databases to individual files", "output": "for I in $(mysql -e 'show databases' -s --skip-column-names); do mysqldump $I | gzip > \"$I.sql.gz\"; done"}
{"instruction": "Port Knocking!", "output": "knock <host> 3000 4000 5000 && ssh -p <port> user@host && knock <host> 5000 4000 3000"}
{"instruction": "Add timestamp to history", "output": "export HISTTIMEFORMAT=\"%F %T \""}
{"instruction": "Recursively change permissions on files, leave directories alone.", "output": "find ./ -type f -exec chmod 644{} \\;"}
{"instruction": "Find files that have been modified on your system in the past 60 minutes", "output": "sudo find / -mmin 60 -type f"}
{"instruction": "Quick access to ASCII code of a key", "output": "showkey -a"}
{"instruction": "using `!#$' to referance backward-word", "output": "cp /work/host/phone/ui/main. cpp !#$:s/host/target"}
{"instruction": "Search recursively to find a word or phrase in certain file types, such as C code", "output": "find . -name \"*.[ch]\" -exec grep -i -H \"search pharse\"{} \\;"}
{"instruction": "Intercept, monitor and manipulate a TCP connection.", "output": "mkfifo /tmp/fifo; cat /tmp/fifo | nc -l -p 1234 | tee -a to.log | nc machine port | tee -a from.log > /tmp/fifo"}
{"instruction": "Block known dirty hosts from reaching your machine", "output": "wget -qO - http://infiltrated.net/blacklisted|awk '!/#|[a-z]/&&/./{print \"iptables -A INPUT -s \"$1\" -j DROP\"}'"}
{"instruction": "check site ssl certificate dates", "output": "echo | openssl s_client -connect www.google.com:443 2>/dev/null | openssl x509 -dates -noout"}
{"instruction": "find files in a date range", "output": "find . -type f -newermt \"2010-01-01\" ! -newermt \"2010-06-01\""}
{"instruction": "Control ssh connection", "output": "[enter]~?"}
{"instruction": "run complex remote shell cmds over ssh, without escaping quotes", "output": "ssh host -l user $(<cmd.txt)"}
{"instruction": "Create a directory and change into it at the same time", "output": "md (){ mkdir -p \"$@\" && cd \"$@\"; }"}
{"instruction": "Colorized grep in less", "output": "grep --color=always | less -R"}
{"instruction": "Exclude multiple columns using AWK", "output": "awk '{$1=$3=\"\"}1' file"}
{"instruction": "ls not pattern", "output": "ls !(*.gz)"}
{"instruction": "output your microphone to a remote computer's speaker", "output": "arecord -f dat | ssh -C user@host aplay -f dat"}
{"instruction": "analyze traffic remotely over ssh w/ wireshark", "output": "ssh root@server.com 'tshark -f \"port !22\" -w -' | wireshark -k -i -"}
{"instruction": "Given a file path, unplug the USB device on which the file is located (the file must be on an USB device !)", "output": "echo $( sudo lshw -businfo | grep -B 1 -m 1 $(df \"/path/to/file\" | tail -1 | awk '{print $1}' | cut -c 6-8) | head -n 1 | awk '{print $1}' | cut -c 5- | tr \":\" \"-\") | sudo tee /sys/bus/usb/drivers/usb/unbind"}
{"instruction": "Remove a line in a text file. Useful to fix \"ssh host key change\" warnings", "output": "sed -i 8d ~/.ssh/known_hosts"}
{"instruction": "Save a file you edited in vim without the needed permissions (no echo)", "output": ":w !sudo tee > /dev/null %"}
{"instruction": "Remove blank lines from a file using grep and save output to new file", "output": "grep . filename > newfilename"}
{"instruction": "delete a line from your shell history", "output": "history -d"}
{"instruction": "Get the IP of the host your coming from when logged in remotely", "output": "echo ${SSH_CLIENT%% *}"}
{"instruction": "Random Number Between 1 And X", "output": "echo $[RANDOM%X+1]"}
{"instruction": "Lists all listening ports together with the PID of the associated process", "output": "lsof -Pan -i tcp -i udp"}
{"instruction": "easily find megabyte eating files or directories", "output": "alias dush=\"du -sm *|sort -n|tail\""}
{"instruction": "Exclude .svn, .git and other VCS junk for a pristine tarball", "output": "tar --exclude-vcs -cf src. tar src/"}
{"instruction": "exit without saving history", "output": "kill -9 $$"}
{"instruction": "How to establish a remote Gnu screen session that you can re-connect to", "output": "ssh -t user@some.domain.com /usr/bin/screen -xRR"}
{"instruction": "Copy a MySQL Database to a new Server via SSH with one command", "output": "mysqldump --add-drop-table --extended-insert --force --log-error=error.log -uUSER -pPASS OLD_DB_NAME | ssh -C user@newhost \"mysql -uUSER -pPASS NEW_DB_NAME\""}
{"instruction": "Convert PDF to JPG", "output": "for file in `ls *.pdf`; do convert -verbose -colorspace RGB -resize 800 -interlace none -density 300 -quality 80 $ file `echo $ file | sed 's/\\.pdf$/\\.jpg/'`; done"}
{"instruction": "Find usb device", "output": "diff <(lsusb) <(sleep 3s && lsusb)"}
{"instruction": "find all file larger than 500M", "output": "find / -type f -size +500M"}
{"instruction": "notify yourself when a long-running command which has ALREADY STARTED is finished", "output": "<ctrl+z> fg; notify_me"}
{"instruction": "Create colorized html file from Vim or Vimdiff", "output": ":TOhtml"}
{"instruction": "live ssh network throughput test", "output": "yes | pv | ssh $host \"cat > /dev/null\""}
{"instruction": "Create a nifty overview of the hardware in your computer", "output": "lshw -html > hardware.html"}
{"instruction": "Save your sessions in vim to resume later", "output": ":mksession! <filename>"}
{"instruction": "Tell local Debian machine to install packages used by remote Debian machine", "output": "ssh remotehost ' dpkg --get-selections' | dpkg --set-selections && dselect install"}
{"instruction": "Bind a key with a command", "output": "bind -x '\"\\C-l\":ls -l'"}
{"instruction": "Take screenshot through SSH", "output": "DISPLAY=:0.0 import -window root /tmp/shot.png"}
{"instruction": "intersection between two files", "output": "grep -Fx -f file1 file2"}
{"instruction": "GREP a PDF file.", "output": "pdftotext [file] - | grep 'YourPattern'"}
{"instruction": "Colorful man", "output": "apt-get install most && update-alternatives --set pager /usr/bin/ most"}
{"instruction": "copy working directory and compress it on-the-fly while showing progress", "output": "tar -cf - . | pv -s $(du -sb . | awk '{print $1}') | gzip > out.tgz"}
{"instruction": "prints line numbers", "output": "nl"}
{"instruction": "convert unixtime to human-readable", "output": "date -d @1234567890"}
{"instruction": "A fun thing to do with ram is actually open it up and take a peek. This command will show you all the string (plain text) values in ram", "output": "sudo strings /dev/mem"}
{"instruction": "Diff on two variables", "output": "diff <(echo \"$a\") <(echo \"$b\")"}
{"instruction": "Prettify an XML file", "output": "tidy -xml -i -m [file]"}
{"instruction": "Encrypted archive with openssl and tar", "output": "tar --create --file - --posix --gzip -- <dir> | openssl enc -e -aes256 -out <file>"}
{"instruction": "Convert seconds into minutes and seconds", "output": "bc <<< 'obase=60;299'"}
{"instruction": "Alias HEAD for automatic smart output", "output": "alias head='head -n $((${LINES:-`tput lines 2>/dev/null||echo -n 12`} - 2))'"}
{"instruction": "Pipe stdout and stderr, etc., to separate commands", "output": "some_command > >(/bin/cmd_for_stdout) 2> >(/bin/cmd_for_stderr)"}
{"instruction": "Manually Pause/Unpause Firefox Process with POSIX-Signals", "output": "killall -STOP -m firefox"}
{"instruction": "Gets a random Futurama quote from /.", "output": "curl -Is slashdot.org | egrep '^X-(F|B|L)' | cut -d \\- -f 2"}
{"instruction": "Use lynx to run repeating website actions", "output": "lynx -accept_all_cookies -cmd_script=/your/keystroke-file"}
{"instruction": "runs a bash script in debugging mode", "output": "bash -x ./post_to_commandlinefu.sh"}
{"instruction": "Instead of writing a multiline if/then/else/fi construct you can do that by one line", "output": "[[ test_condition ]] && if_true_do_this || otherwise_do_that"}
{"instruction": "Display a list of committers sorted by the frequency of commits", "output": "svn log -q|grep \"|\"|awk \"{print \\$3}\"|sort|uniq -c|sort -nr"}
{"instruction": "check the status of 'dd' in progress (OS X)", "output": "CTRL + T"}
{"instruction": "A child process which survives the parent's death (for sure)", "output": "( command & )"}
{"instruction": "prevent accidents while using wildcards", "output": "rm *.txt <TAB> <TAB>"}
{"instruction": "Opens vi/vim at pattern in file", "output": "vi +/pattern [file]"}
{"instruction": "April Fools' Day Prank", "output": "PROMPT_COMMAND='if [ $RANDOM -le 3200 ]; then printf \"\\0337\\033[%d;%dH\\033[4%dm \\033[m\\0338\" $((RANDOM%LINES+1)) $((RANDOM%COLUMNS+1)) $((RANDOM%8)); fi'"}
{"instruction": "Press Any Key to Continue", "output": "read -sn 1 -p \"Press any key to continue...\""}
{"instruction": "Get your external IP address", "output": "curl ip.appspot.com"}
{"instruction": "List installed deb packages by size", "output": "dpkg-query -Wf '${Installed-Size}\\t${Package}"}
{"instruction": "backup all your commandlinefu.com favourites to a plaintext file", "output": "clfavs(){ URL=\"http://www.commandlinefu.com\"; wget -O - --save-cookies c --post-data \"username=$1&password=$2&submit=Let+me+in\" $URL/users/signin;for i in `seq 0 25 $3`;do wget -O - --load-cookies c $URL/commands/favourites/plaintext/$i >>$4;done;rm -f c;}"}
{"instruction": "send echo to socket network", "output": "echo \"foo\" > /dev/tcp/192.168.1.2/25"}
{"instruction": "Schedule a script or command in x num hours, silently run in the background even if logged out", "output": "( ( sleep 2h; your-command your-args ) & )"}
{"instruction": "Go to parent directory of filename edited in last command", "output": "cd !$:h"}
{"instruction": "Draw a Sierpinski triangle", "output": "perl -e 'print \"P1"}
{"instruction": "Run a long job and notify me when it's finished", "output": "./my-really-long-job.sh && notify-send \"Job finished\""}
{"instruction": "Make anything more awesome", "output": "command | figlet"}
{"instruction": "List all files opened by a particular command", "output": "lsof -c dhcpd"}
{"instruction": "Nicely display permissions in octal format with filename", "output": "stat -c '%A %a %n' *"}
{"instruction": "recursive search and replace old with new string, inside files", "output": "$ grep -rl oldstring . |xargs sed -i -e 's/oldstring/newstring/'"}
{"instruction": "shut of the screen.", "output": "xset dpms force standby"}
{"instruction": "Create a single-use TCP (or UDP) proxy", "output": "nc -l -p 2000 -c \" nc example.org 3000\""}
{"instruction": "read manpage of a unix command as pdf in preview (Os X)", "output": "man -t UNIX_COMMAND | open -f -a preview"}
{"instruction": "Switch 2 characters on a command line.", "output": "ctrl-t"}
{"instruction": "List the number and type of active network connections", "output": "netstat -ant | awk '{print $NF}' | grep -v '[a-z]' | sort | uniq -c"}
{"instruction": "Use file(1) to view device information", "output": "file -s /dev/sd*"}
{"instruction": "exclude a column with cut", "output": "cut -f5 --complement"}
{"instruction": "Recover a deleted file", "output": "grep -a -B 25 -A 100 'some string in the file' /dev/sda1 > results.txt"}
{"instruction": "Insert the last argument of the previous command", "output": "<ESC> ."}
{"instruction": "View the newest xkcd comic.", "output": "xkcd(){ wget -qO- http://xkcd.com/|tee >(feh $(grep -Po '(?<=\")http://imgs[^/]+/comics/[^\"]+\\.\\w{3}'))|grep -Po '(?<=(\\w{3})\" title=\").*(?=\" alt)';}"}
{"instruction": "Create an audio test CD of sine waves from 1 to 99 Hz", "output": "( echo CD_DA; for f in{01..99}; do echo \"$f Hz\">&2; sox -nt cdda -r44100 -c2 $f.cdda synth 30 sine $f; echo TRACK AUDIO; echo FILE \\\"$f.cdda\\\" 0; done) > cdrdao.toc && cdrdao write cdrdao.toc && rm ??.cdda cdrdao.toc"}
{"instruction": "Remove color codes (special characters) with sed", "output": "sed -r \"s/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g\""}