Tag: bash

rm: delete files before (or after) a specific date

Sometimes I have to delete files before or after a specific date. Here is a one liner to do this:

Tagged with: , , , , , , ,

Linux: Set language to default for console or scripts

Sometimes you may want to change the output language of commands. E.g. if you have to google for error messages or need the output for further use in scripts.

Tagged with: , , , , ,

Linux: Get capacity of a drive with lsblk (NO root permission needed)

Sometimes one needs to know the exact capacity of a drive (e.g. for bash scripts). Here is a one liner for this with lsblk which has the advantage that it doesn’t need root permission:

Tagged with: , , , , ,

Linux: Get capacity of a drive with fdisk (root permission needed)

Sometimes one needs to know the exact capacity of a drive (e.g. for bash scripts). Here is a one liner for this with fdisk:

Tagged with: , , , , ,
Top