{"id":12,"date":"2014-11-19T23:06:48","date_gmt":"2014-11-19T21:06:48","guid":{"rendered":"http:\/\/blog.chloesoe.ch\/?p=12"},"modified":"2017-09-05T23:12:17","modified_gmt":"2017-09-05T21:12:17","slug":"notes-for-103-3-and-nice-to-know","status":"publish","type":"post","link":"https:\/\/blog.chloesoe.ch\/?p=12","title":{"rendered":"Notes for 103.3 and nice to know"},"content":{"rendered":"<p>Change time stamp of a file:<br \/>\n<code>touch -t YYYYMMDDhhmm.ss myfile<\/code><br \/>\n&nbsp;<br \/>\nshow full time stamp<br \/>\n<code>ls -la --time-style=full-iso myfile<\/code><\/p>\n<h3>wildcards<\/h3>\n<p>? = replace <strong>one<\/strong> char<br \/>\n* = replace 0 or x chars<br \/>\n[a-z] = replace <strong>one<\/strong> char in the specified range<br \/>\n[abcde] = replace <strong>one<\/strong> char of the specified characters<br \/>\n[!a-z] = replace <strong>one<\/strong> char NOT in the specified range<\/p>\n<h3>tar<\/h3>\n<p>Not well known options<br \/>\nt = list<br \/>\n<code>tar tzf salami.tar.gz<\/code><\/p>\n<h3>zipping the shit out of the files<\/h3>\n<p><code> gzip -c myfile.txt &gt; myfile.txt.gz<\/code> creates a myfile.txt.gz and does not delete the original myfile.txt<br \/>\n<code> gzip -l myfile.gz<\/code> lists the content of myfile.gz<\/p>\n<p>decompress with:<\/p>\n<ul>\n<li>gzip -d <\/li>\n<li>gunzip<\/li>\n<li>zcat<\/li>\n<\/ul>\n<p><code> bzip2 <\/code> has usually better compress rate. It uses the same parameters.<br \/>\ndecompress with:<\/p>\n<ul>\n<li>bzip2 -d <\/li>\n<li>bunzip<\/li>\n<li>bzcat<\/li>\n<\/ul>\n<h3>cpio<\/h3>\n<p>extract files out of archives<br \/>\n<code>cpio -i | --extract<\/code> = copy in mode; copy from archive in file system<br \/>\n<code>cpio -o | --create<\/code> = copy out mode; copy files into the archive<br \/>\n<code>cpio -p | --pass-through<\/code>no archive, all files of stdin into a dir<\/p>\n<p>backup all ods in home to backup<br \/>\n<code>find \/home\/ -name *.ods | cpio -pd \/backup<\/code><\/p>\n<p>-d = creates directories<\/p>\n<h3>dd<\/h3>\n<p>backup mbr<br \/>\n<code> dd if=\/dev\/sda of=mbr.backup ibs=512 count=1<\/code><\/p>\n<p><code>file myfile.sh<\/code> shows the type of the file<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Change time stamp of a file: touch -t YYYYMMDDhhmm.ss myfile &nbsp; show full time stamp ls -la &#8211;time-style=full-iso myfile wildcards ? = replace one char * = replace 0 or x chars [a-z] = replace one char in the specified range [abcde] = replace one char of the specified characters [!a-z] = replace one char&#8230; <a href=\"https:\/\/blog.chloesoe.ch\/?p=12\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Notes for 103.3 and nice to know<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-lpic","tag-lpic"],"_links":{"self":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12"}],"version-history":[{"count":6,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":18,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=\/wp\/v2\/posts\/12\/revisions\/18"}],"wp:attachment":[{"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.chloesoe.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}