Today I discovered an article explaining Linux file system timestamps: Linux File Timestamps Explained: atime, mtime, and ctime; and a good thing too, because I always thought ‘ctime’ was ‘create time’, but not so! Turns out that ‘ctime’ is ‘change time’, similar to ‘mtime’ but apparently cannot be set from userspace. My investigations were prompted by my investigations info how `borg create` identified changed files.
By default when you run a dump with ‘mysqldump’ the date of the dump is appended to the file, e.g.:
jj5@love:~/desktop/experiment$ udiff * --- dbt__jj_dev_1__svn_jdrepo.1.sql 2019-06-11 18:11:13.267758230 +1000 +++ dbt__jj_dev_1__svn_jdrepo.2.sql 2019-06-11 18:12:03.856075974 +1000 @@ -32,4 +32,4 @@ /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-06-10 21:59:44 +-- Dump completed on 2019-06-10 12:06:49
This causes dumps for a single database that has not changed to have two dumps which differ. It’s better to have dumps from the same unchanged database to be the same. To facilitate that add the –skip-dump-date option when running ‘mysqldump’.
See here for the back-story.
So I was running this:
/var/www/jj-web-1-www.jj5.net-sixsigma: file.recurse: - clean: True - user: root - group: root - dir_mode: 755 - file_mode: 644 - source: salt://inst/mediawiki-1.29 - require: - pkg: apache2
And getting an error like this:
---------- ID: /var/www/jj-web-1-www.jj5.net-sixsigma Function: file.recurse Result: False Comment: #### /var/www/jj-web-1-www.jj5.net-sixsigma/vendor/james-heinrich/getid3/getid3/module.audio.ac3.php #### Source file 'salt://inst/mediawiki-1.29/vendor/james-heinrich/getid3/getid3/module.audio.ac3.php?saltenv=base' not found #### /var/www/jj-web-1-www.jj5.net-sixsigma/vendor/james-heinrich/getid3/getid3/module.audio-video.mpeg.php #### Source file 'salt://inst/mediawiki-1.29/vendor/james-heinrich/getid3/getid3/module.audio-video.mpeg.php?saltenv=base' not found Started: 14:27:18.352264 Duration: 134735.945 ms Changes: ----------
The issue was that the source files mentioned weren’t in UTF-8 format. To convert the files I ran, e.g.:
$ iconv -f WINDOWS-1252 -t UTF-8//TRANSLIT < module.audio-video.mpeg.php.bak > module.audio-video.mpeg.php
(Actually I couldn’t get the ‘iconv’ command to work so I edited manually in Vim)
To exclude .svn directories from a recursive grep, use the –exclude option, for example:
$ grep --exclude='*.svn*' -R 'your.*search' .
So I had an issue with KCachegrind where I would open a cachegrind profile file and “nothing happened”. The status bar said the file had loaded, but the user interface widgets were all empty. Turns out clicking Settings -> Sidebars -> Function Profile loaded the part of the UI I needed to get started… everything is easy when you know how!
Today I found this thread from which I learned:
svn co --config-option config:miscellany:use-commit-times=yes https://example.com/svn/repo/proj
You can also set the option in your svn config, but you probably don’t want to do that.
Found how to escape @ characters in Subversion managed file names?. The short answer is that you add an extra ‘@’ character at the end of the file name…
Today I learned about extensions.greasemonkey.fileIsGreaseable… a way to get Greasemonkey to process file-system documents… for scripts to work with file:// paths, you need to open about:config and set extensions.greasemonkey.fileIsGreaseable to true.
To update a config file:
$ cp old.conf updated.conf $ merge -A updated.conf new.conf old.conf
Then edit updated.conf and resolve merge conflicts then deploy updated.conf.