Tag Archives: Unix & Linux

bash extended glob – match files without prefix

I’m trying to match filenames for a fail2ban jail – so I need to use filename globbing only – not regexes or bash scripting. My /var/log/apache2 directory contains files including: example.com.error.log db.example.com.error.log app1.example.com.error.log app2.example.com.error.log I’m trying to create a glob to match all files ending in .error.log except db.example.error.log – is this possible? I’ve tried… Read More »

App cannot receive UDP package

I have a scenario with three devices: Android-Smartphone, Linux-Laptop (Linux mint) and a Sony a7R camera. My goal is to talk to the camera using the laptop and Sony’s http-SDK via WiFi (Cam opens an hotspot). The SDK comes with the code for an Android sample app. It first sends a ssdp-package whereupon the camera… Read More »

Is it safe to delete SSH user accounts?

This is my first question on here and I hope it doesn’t sound too ridiculous and I am posting it in the right place. I have a Magento store running on Linux server. I am running two stores (Magento 1 and Magento 2) on the same server. I checked my access logs and found SSH… Read More »

How to write a wrapper for find?

I’m doing text processing on a set of files, and it implies running find on them, and ignoring (and pruning) some directories, such as find . -name ‘*.php’ -not ( -path ./.git -prune -o -path ./.idea -prune ) -exec sed -E -i ‘s/function_call/refactored_function/g’ {} ‘+’ The thing is the first part of the command (switches… Read More »

Identifying if RAID is used or not

I have a Linux server, and when I want to see its hard disk size, I use this command: df -h But in fact, I know, my server consists of some hard disks and its original disk space is more than that. There may be RAID. My question is this: How can I know (identify)… Read More »