This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:commands [2011/12/03 17:49] 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 | + | **the place for useful commands, 1-liners, mini-howtos & snippets** |
- | + | ||
- | please leave a short description or some links here | + | |
+ | please give a short description or some links | ||
---- | ---- | ||
Line 13: | Line 12: | ||
tar -czvf myfiles.tar.gz / | tar -czvf myfiles.tar.gz / | ||
+ | |||
+ | |||
+ | **create tar.gz archiv of full system without ** | ||
+ | |||
+ | tar cvpzf / | ||
+ | |||
\\ | \\ | ||
- | **backup mirror.tar via ssh & cat ** | + | ---- |
- | the file-globbing regex /[a-oq-z]* leaves out /p* dirs, to exclude /proc :-) | + | ===== compressed dump of complete filesystems ===== |
- | ssh -v root@hostname tar cvf - /[a-oq-z]* | cat > / | + | **backup raw data of a disc (as root): ** |
+ | dd if=/dev/sdX | gzip -c9 > / | ||
+ | |||
+ | **restore to a __drive of same size__ as original medium:** | ||
+ | |||
+ | gunzip -c / | ||
\\ | \\ | ||
---- | ---- | ||
+ | |||
+ | ===== various methods howto backup & restore ===== | ||
+ | |||
+ | **[[http:// | ||
+ | |||
+ | \\ | ||
+ | ---- | ||
+ | |||
===== sound ===== | ===== sound ===== | ||
Line 28: | Line 46: | ||
**mp3 " | **mp3 " | ||
- | mp3gain analyses sound files and saves an id3 volume metatag to them. | + | mp3gain analyses sound files and saves an id3 volume metatag to them. many music-players can read that id3 tag and adjust the volume |
- | + | ||
- | many music-players can read that id3 tag and adjust the volume. | + | |
find / | find / | ||
\\ | \\ | ||
+ | ---- | ||
+ | |||
+ | ===== bash completion ===== | ||
+ | |||
+ | **debian misses to enable this by default :(** | ||
+ | it enables a lot of auto complete for file paths, commands, command parameters(!) and more | ||
+ | |||
+ | | ||
+ | |||
+ | add this to / | ||
+ | |||
+ | if [ -f / | ||
+ | . / | ||
+ | fi | ||
+ | |||
+ | enable it by opening a new console or | ||
+ | | ||
+ | |||
+ | info from: http:// | ||
+ | |||
+ | ==== Create Random File ==== | ||
+ | |||
+ | count is in KiB | ||
+ | |||
+ | dd bs=1024 count=1000 </ | ||
+ | |||
+ | ===== Fix locales ===== | ||
+ | |||
+ | export LANGUAGE=en_US.UTF-8; | ||