Blog Spot!


How to do a live system backup in a single file

tl;dr

gzip

sudo tar czfv /backup.tar.gz --exclude=/backup.tar.gz --exclude=/dev --exclude=/mnt --exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/run --exclude=/lost+found /

It will create an archive of all your files at /backup.tar.gz, which you can then copy over to another computer/drive and restore your files

mksquashfs - tldp

sudo mksquashfs / /backup.sqsh -e /backup.sqsh /media /dev /mnt /proc /sys /tmp /run /lost+found

"-e" switch excludes folders you want to exclude

Added on 12.Mar.2021
Tags: backup linux terminal gzip mksquashfs

Linux - wget - download all files of type X in current directory without going UP or DOWN the tree.

gnu wget

Examples:

  1. Download all .md5 files in current directory without going UP or DOWN the tree.
wget -r -np -nd -l1 -A "*.md5" https://mxlinux.ipacct.com/MX-Linux/ANTIX/Final/antiX-19/ -P ./mx

‘-r’, ‘--recursive’

Specify recursive download

‘-np’, ‘--no-parent’

Do not ever ascend to the parent directory when retrieving recursively. This is a useful option, since it guarantees that only the files below a certain hierarchy will be downloaded. See Directory-Based Limits, for more details.

‘-nd’, ‘--no-directories’

Do not create a hierarchy of directories when retrieving recursively. With this option turned on, all files will get saved to the current directory, without clobbering (if a name shows up more than once, the filenames will get extensions ‘.n’).

‘-l depth’, ‘--level=depth’

Set the maximum number of subdirectories that Wget will recurse into to depth. In order to prevent one from accidentally downloading very large websites when using recursion this is limited to a depth of 5 by default, i.e., it will traverse at most 5 directories deep starting from the provided URL. Set ‘-l 0’ or ‘-l inf’ for infinite recursion depth.

‘-A acclist’, ‘--accept acclist’
‘-R rejlist’, ‘--reject rejlist’

Specify comma-separated lists of file name suffixes or patterns to accept or reject (see Types of Files). Note that if any of the wildcard characters, ‘*’, ‘?’, ‘[’ or ‘]’, appear in an element of acclist or rejlist, it will be treated as a pattern, rather than a suffix. In this case, you have to enclose the pattern into quotes to prevent your shell from expanding it, like in ‘-A "*.mp3"’ or ‘-A '*.mp3'’.

‘-P prefix’, ‘--directory-prefix=prefix’

Set directory prefix to prefix. The directory prefix is the directory where all other files and subdirectories will be saved to, i.e. the top of the retrieval tree. The default is ‘.’ (the current directory).

Added on 06.Mar.2021
Tags: linux wget terminal download

Omit & Pick functionality for JavaScript

ES5-ES6-ES2017-ES2019 omit & pick

gist

Added on 15.Feb.2021
Tags: js pick omit filter whitelist blacklist

Extending the life of your Raspberry PI SD Card

Added on 01.Feb.2021
Tags: articles sd card raspberry io linux

How To Force fsck (Filesystem Consistency Check) After Reboot

touch /forcefsck simply creates a file /forcefsck. This file will cause the system to run fsck on the next reboot before the filesystem is mounted. Its similar to when you try to run chkdsk in Windows and it says it can't but it will do it on the next reboot.

askubuntu

Complete article about this - how-to-force-fsck-filesystem

Added on 31.Jan.2021
Tags: fs check linux hdd system terminal

Search


PHP Libraries


Carbon lib / docs
Idiorm lib / docs
Image Workshop lib / docs
lorenzos/Minixed lib / docs
Parsedown lib / docs
PHP Paginator lib / docs
PHP Redis lib / docs
QrCode lib / docs
Requests lib / docs
Slim lib / docs
Spyc lib / docs
TWIG lib / docs
Upload lib / docs
Validation lib / docs
Zebra Image lib / docs

JS Libraries


AJV lib / docs
BackboneJS lib / docs
Bootstrap Notify lib / docs
C3.js lib / docs
ChartJS lib / docs
FastMD5 lib / docs
HighlightJS lib / docs
jQuery-Storage lib / docs
JS-Cookie lib / docs
Leaflet JS lib / docs
LowDB lib / docs
Marked lib / docs
NeedlyJS lib / docs
ParcelJS lib / docs
RequireJS lib / docs
Swig lib / docs
Toastr lib / docs
Underscore lib / docs
ValidateJS lib / docs
top