This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:commands [2012/02/05 02:53] tkilla |
linux:commands [2020/11/12 00:20] (current) tkilla |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Shell Commands ====== | + | ====== Shell Commands |
**the place for useful commands, 1-liners, mini-howtos & snippets** | **the place for useful commands, 1-liners, mini-howtos & snippets** | ||
Line 13: | Line 13: | ||
tar -czvf myfiles.tar.gz / | tar -czvf myfiles.tar.gz / | ||
- | \\ | ||
- | **backup mirror.tar via ssh & cat ** | ||
- | the file-globbing regex /[a-oq-z]* leaves out /p* dirs, to exclude /proc :-) | + | **create tar.gz archiv of full system without ** |
+ | |||
+ | tar cvpzf /mnt/ | ||
- | ssh -v root@hostname tar cvf - /[a-oq-z]* | cat > / | ||
\\ | \\ | ||
---- | ---- | ||
- | ===== swap ===== | + | ===== compressed dump of complete filesystems |
- | **create and use a swapfile** | + | **backup raw data of a disc (as root): |
- | dd if=/dev/zero of=/swapfile bs=1024 count=100000 | + | |
- | | + | |
- | + | ||
- | edit /etc/fstab -- add a swap-line for auto activation after reboot: | + | |
- | / | + | **restore to a __drive of same size__ as original medium:** |
+ | gunzip -c / | ||
+ | \\ | ||
+ | ---- | ||
- | turn it on: | + | ===== various methods howto backup & restore ===== |
- | | + | |
- | and verify: | + | **[[http:// |
- | free -m | + | |
- | mount | + | |
\\ | \\ | ||
---- | ---- | ||
+ | |||
===== sound ===== | ===== sound ===== | ||
Line 74: | Line 71: | ||
info from: http:// | info from: http:// | ||
+ | ==== Create Random File ==== | ||
+ | |||
+ | count is in KiB | ||
+ | |||
+ | dd bs=1024 count=1000 </ | ||
+ | |||
+ | ===== Fix locales ===== | ||
+ | |||
+ | export LANGUAGE=en_US.UTF-8; | ||