equals to: one neat function of the find command, it that what it found can be passed to another program for further processing. or: it can delete the file by adding the option -delete BUT (!!!) THIS IS DANGEROUS! as […]
inxi – Command line system information script for console and IRC DESCRIPTION It is also used a debugging tool for forum technical support to quickly ascertain users’ system configurations and hardware. inxi shows system hardware, CPU, drivers, Xorg, Desktop, Kernel, […]
# requirements su – root apt update # has the convert command apt install imagemagick vim /scripts/create_thumbs.sh #!/bin/bash THUMBS_FOLDER=/path/to/images/thumbnails for file in /path/to/images/* do # next line checks the mime-type of the file IMAGE_TYPE=`file –mime-type -b “$file” | awk -F’/’ […]
this script is suppsed to be started in a folder full of images that need sorting. (it is even possible to ssh -X into a machine and do this remotely) # requirements su – root apt update # install simple […]
# count how many FOLDERS are in /this/folder find /this/folder -type d|wc -l # count how many FILES are in this FOLDER and ALL SUBFOLDERS find . -type f|wc -l # count how many FILES are in this FOLDER only […]
making usb sticks with GNU Linux and dd: WARNING! one single wrong drive letter and data could be irreversible destroyed! (it has happened many times before!!!) so this script make_stick.sh (download it here) aim’s to double check if it is […]
as retro as it gets… seems to be a clone of MoonPatrol. hostnamectl; # tested on Static hostname: lenovo Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-16-amd64 Architecture: x86-64 apt update apt install moon-buggy apt show moon-buggy Package: moon-buggy […]
(plain) text is (still) the universal “interface” or “format” processing, viewing, diffing text is important to stop small changes in otherwise extensive and identical config files. the heavy weight eclipse gui diff: an optical nice diff brings the otherwise slow […]
ffmpeg / avconv is pretty nice. it can even do mp4 to gif conversion! 🙂 so what the user can do is: use SimpleScreenRecorder, to record a fixed rectangle of the screen to mp4 and then use ffmpeg / avconv […]
hostnamectl; # tested on Icon name: computer-desktop Chassis: desktop Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-8-amd64 Architecture: x86-64 su – root; # become root apt update apt install rfkill rfkill list all 0: phy0: Wireless LAN Soft blocked: […]
is there an ideal IDE for every task? or no IDE at all? Nope. Of course just as programming languages every IDE has their pros and cons. (build for a specific purpose? might serve other purposes also) There is not […]
ls -lah –color –time-style=+%F # will output year-month-day like: 2020-02-06 # if one needs the actual TIMESTAMP: go –full-time # ls -lah –color –full-time will output time in format: # 2020-02-04 11:37:57.619196543 +0100 # can put it into (debian/ubuntu/mint…) vim […]
for good overview it makes sense to label the harddisk partitions according to functionality (what is their purpose?) GNU Linux bash – how to label partitions tune2fs (xfs & ext4) all infos about one’s harddisk: # tested on: hostnamectl Static […]
firewall & the GNU-Linux Pinguin: firewalls: where do thy go? and does thee protect from DDoS? as always in software development and as always in GNU Linux, there is not “one” firewall system, no, there are many and it is […]
situation: one is userA but wants to ssh login to server with ipv4: 123.123.123.123 via userB (dedicated user for that server/task). so what one does is: make sure one can login as userB than as userA: userA: ssh -v -i […]
very very nice actually. visit the site: https://www.wieistmeineip.de/ 1) setup an ssh server 2) make sure u can login with the given user ssh -N -D 9090 -p22 user@yourserver.com now config firefox proxy like this: click “ok” then visit the […]
mdadm -E /dev/sd[a-z] # -E, –examine # Print contents of the metadata stored on the named device(s). # Note the contrast between –examine and –detail. # –examine applies to devices which are components of an array, while # –detail applies […]
some jpgs are badly compressed, taking 5-10MBytes each! a little nifty cool tool let’s you batch recompress WARNING! Always test things out before applying it to your original data! # become root su – root # install jpegoptim apt install […]
list all current ips that are connected to port 587 apt install net-tools; # install netstat netstat -anp | grep :587 | grep ESTABLISHED
while loop: One way to do it is: while read p; do echo “$p” done <peptides.txt As pointed out in the comments, this has the side effects of trimming leading whitespace, interpretting backslash sequences, and skipping the trailing line if […]
yum install ascii # or apt install ascii ascii Usage: ascii [-dxohv] [-t] [char-alias…] -t = one-line output -d = Decimal table -o = octal table -x = hex table -h = This help screen -v = version information Prints […]
# tested on yum install inxi inxi -b System: Host: hp.centos Kernel: 5.1.15 x86_64 bits: 64 Desktop: MATE 1.16.2 Distro: CentOS Linux release 7.6.1810 (Core) Machine: Type: Server System: HP product: ProLiant DL360 G6 v: N/A serial: XXXXXXXXX Mobo: N/A […]
bc is a nice calculator that one can use under linux terminal. a good exercise: count from 0 to 255 and convert it to binary # install # debian/ubuntu apt install bc # fedora/redhat/centos yum install bc # run bc […]
update: safety first! when it comes to important files: safety comes first thus recommend to the user that wants to go pro the following backup system: have two complete backups at two different places: backupA: at the company, USB 3.0 […]
this is, because this is, because, when one logs in, and opens another shell as the same user, the last bash process to quit, will save to ~/.bash_history overwrite history. to avoid this add: (TEST IN PROGRESS (UNTESTED)!) # Avoid […]
it is actually possible to open a text file in less, then switch over to vim (without exiting less) and when done with editing, switch back to less. less /open/this/file/for/viewing # switch over to vim :v # now one is […]
tar gz (single core) -> tar pigz (multi core) tar might be old, but still a great program for archiving files manpage: tar.man.txt to get multi core usage for compression (faster) the user tells tar to use a different compression […]
especially in times of EU-GDPR–DSGVO but also for the user’s privacy effectively shredding data is important. if the admin-user wants to wipe-shred-secure-delete entire harddisks look at this article. GNU Linux Debian 10 can do that 🙂 update: 2024: want to […]
if you want to search all files (file size smaller than 256MBytes) for a match in it’s sha1 checksum: #!/bin/bash find / -type f -size -256M | while read fname; do checksum=$(sha1sum “$fname”); CHECKSUM=${checksum^^}; echo $CHECKSUM; done write it to […]
WARNING! BE VERY VERY CAREFUL! YOU CAN DESTROY YOUR SYSTEM! so better use a system that is not production important/not a live server. use a laptop that has NOTHING ATTACHED TO IT! (unplug all USB Sticks and external USB Drives) […]