- Видео 11
- Просмотров 140 228
Hackpens
Великобритания
Добавлен 18 апр 2020
Check the temperature of a CPU with BASH script
here's how to see the current temperature of your CPU using BASH - Celsius and Fahrenheit.
A very simple script.
A very simple script.
Просмотров: 3 185
Видео
Another Reason to Install Fail2ban
Просмотров 7994 года назад
Anybody who has a home server running any kind of Linux server software should see this.
Bash Script to Automatically Detect and Scan Your Local Network!
Просмотров 30 тыс.4 года назад
How to write a script in Bash that detects the network you're connected to, sweep it to find devices, and scan those devices for open ports.
Write a Simple IP Sweeping Script in BASH
Просмотров 15 тыс.4 года назад
Discover the number of devices connected to your network with this simple IP sweeping script written in BASH.
Use "crontab" to Update your Packages
Просмотров 3,2 тыс.4 года назад
Using crontab to schedule a Bash script to run - updating and upgrading the packages on a Linux machine.
3. Printing to Screen, and a Little Math(s) - LIVE Lesson Recording
Просмотров 2124 года назад
Printing strings, multi-line strings, strings added together, and some basic math(s) capabilities of python. Recorded during a live instructional session.
Filtering .log files, with cat, grep, cut, sort, and uniq
Просмотров 87 тыс.4 года назад
Using "cat", "grep", "cut", "sort", "uniq", and "wc" ALL in one line, I show you how to filter information from a .log file, and you find out just how important strong passwords really are. This video was recorded during an online instructional session and is intended for educational purposes.
2+. Linux File Permissions - LIVE Lesson Recording
Просмотров 1704 года назад
How to add and remove permissions in Files and Directories in the Linux System Directory. Recorded during a LIVE instructional session.
How to Install Virtualbox and Kali Linux Virtual Machine
Просмотров 2534 года назад
Safely installing Virtualbox and importing a working version of Kali Linux 2020 on you PC, Mac, or Linux computer. Everything you need to know!
2. Navigating Linux System Directory, and Creating Files and Directories - Live Lesson Recording
Просмотров 2274 года назад
In this video we look at how to navigate through the system directory and we learn several ways to create and delete new directories and files. This is a recording of a live instructional session.
1. Introduction to Linux Command Line and Python - Live Lesson Recording.
Просмотров 7234 года назад
Taken from a live online instructional class, this gives you the very first tentative steps into the Linux command line and writing a very basic one-line Python program. Starting from the very beginning, everything is explained as we work through to the final product. PLEASE NOTE: For obvious security reasons all user accounts mentioned in this video have since been removed and the server featu...
Thanks for this one. Helped a lot
You really help me understand it better thanks gramps 🫂
Pls I have been having issues with my bash code I really need help
I’m on windows and I’m currently tasked with finding stuff for a log file they gave me
hi do you know how to copy log file from cowrie honeypot is on?
If I wanted to count the number of times that each unique instance showed up. What would I do for that? Would I do the unique and then do the word count for each instance by using grep for that specific phrase?
REALLY HELPED THANK YOU SO MUCH
this is exactly what I was looking for and even more! thank you so much!
Without changing directory how can we do
I don't want each line content just displaying the what are log files present in all other sub directoties also
awesome video
this one is one of the most helpful tutorials out there that show how powerful grep and pipe are. Thanks for sharing that and I hope you make more cool stuff.
Thanks
You could configure fail2ban not only for sshd but also for nginx requests to catch 400-404 errors.
Thx. Very helpful.
For compressed files, zcat zgrep
sir can we use awk instead of cut?
Thank you!
Thank you
genius
Beautiful. absolutely beautiful.
hOW CAN I SEE ALL FILES ON HARD DRIVE OR USB ? AND HOW COULD DECRYPTED FILES BE ERASED OR OVERWRITE WITH SUDO SHRED ?
./pingy: line 15: $OCTETS.txt: ambiguous redirect Any ideas ?? I followed step by step - syntax is exactly identical
thank you so much 😃🙏
To filter .log files using cat, grep, cut, sort, and uniq commands, follow these steps: 1. First, open your terminal or command prompt. 2. Navigate to the directory containing the .log files you want to filter. You can use the 'cd' command followed by the directory path. For example: ```bash cd /path/to/your/log/files ``` 3. Use the 'cat' command to concatenate and display the contents of a .log file. For instance: ```bash cat your_log_file.log ``` 4. To search for specific lines in the .log file, use the 'grep' command. For example, if you want to find all lines containing the word 'error', you can use: ```bash grep 'error' your_log_file.log ``` 5. If you want to extract specific columns from the output, use the 'cut' command. The format is 'cut -d delimiter -f fields'. For example, if your log file has columns separated by a space and you want to extract the first column, use: ```bash cut -d ' ' -f1 ``` 6. To sort the lines alphabetically or numerically, use the 'sort' command. For example: ```bash sort your_log_file.log ``` 7. Finally, to remove duplicate lines from the sorted output, use the 'uniq' command. For example: ```bash uniq your_log_file.log ``` By combining these commands, you can create a pipeline to filter .log files effectively. For instance: ```bash cat your_log_file.log | grep 'error' | cut -d ' ' -f1 | sort | uniq ``` This command will display unique first columns from lines containing the word 'error' in your_log_file.log.
Good vid, thank you
Thankyou this video was exactly what i needed
thanks for the amazing video love it <3
as a complete beginner, this video really helps. Thanks a lot!!!
A great simple illustration
Muy buen video, gracias por compartir, saludos desde México
@Hackpens hope you are doing well , amazing videos full of information , can not find in hours of traning videos , pleaase if you create more here community is waiting !!!!!!!
nice , except cut -d " " -f x not working for me , i will dig durther to figure out why..
Thanks.. very helpful and will be using this as a reference from now on
6:36 someone tried Minecraft lol
you don't need cat, just use grep "string" auth.log also, you instead of cut, just use awk '{print $11}'
😊 great videos 👍 thank you!!!
Your explanation is better than more other thank you so much sir
Keep making these super cool videos, they're such a lifesaver
Great video showing the power of the built in command line tools. Remember, the command line (and chosen shell, ie; bash) interact directly with the kernel. Control your hardware directly from your keyboard rather than depending on gui interpreters that stand between you and the kernel like other operating systems.
Now dump all the unique IPs into a text file, and run nslookup on each one. $50 says they all are located in China or Russia. At least %98-99 of them. At least that's what I always end up finding.
Quick revision: #cat auth.log | grep "invalid" | cut -d " " -f 11 | sort | uniq | wc -l #cat fail2ban.log | grep "Ban" | grep -v "Restore" | cut -d " " -f 16 | sort | uniq -d > ~/uniq_ips.txt
Awesome.
Great introduction to the topic, a few things that i think are worth mentioning, once people have learned the commands that were being demonstrated: If the logs your using have a variable amount of spaces between columns (to make things look nice), that can mess up using cut, to get around that you can use `sed 's/ */ /g` to replace any n spaces in a row with a single space. You can also use awk to replace the sed/cut combo, but that's a whole different topic. uniq also has the extremely useful -c flag which will add a count of how many instances of each item there were. And as an aside if people wanted to cut down on the number of commands used you can do things like `grep expression filepath` or `sort -u` (on a new enough system), but in the context of this video it is probably better that people learn about the existence of the stand alone utilities, which can be more versatile. Once you're confident in using the tools mentioned in the video, but you still find that you need more granularity than the grep/grep -v combo, you can use globbing, which involves special characters that represent concepts like "the start of a line"(^) or the wildcard "any thing"(*) (for example `grep "^Hello*World"` means any line that starts with Hello, and at some point also contains World, with anything or nothing in-between/after). If that still isn't enough you might want to look into using regular expressions with grep, but they can be even harder to wrap your mind around if you've never used them before. (If you don't understand globbing or re really are just from reading this that's fine, I'm just trying to give you the right terms to Google, because once you know something's name it becomes infinitely easier to find resources on them)
I am checking this video 3year after upload. The video tutorial is on point and clear.
Thanks! That was informative. The only thing I would have done differently is flip the order of uniq -d and sort. Less items to sort after uniq filters them out.
Great Stuff with simple explaination
Can't be more appreciative.thanks man 👏
Sir, wonderful explanation. Kindly do more real-time videos on Linux Bash scripting, it will be very helpful for me and people like me who are trying to get into Bash scripting just by pressure from the higher management to finish an automation task :):)
from the ip addres can you find out their location ?
If the user isn't using a VPN service, then yes (an approximate location) using a publicly available tool, like whatismyipaddress.com/ip-lookup
Thank you
You're welcome :)