<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6186417</id><updated>2024-09-13T03:21:28.447+01:00</updated><category term="old_perl"/><category term="Citrix"/><category term="Perl"/><category term="password"/><title type='text'>serfGeek&#39;s Geek::Blog</title><subtitle type='html'>A place for John to record his techy notes, both to refer back to when needed, and as a help for others...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>225</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6186417.post-8824450736466038909</id><published>2020-12-11T01:17:00.005+00:00</published><updated>2020-12-11T01:17:54.395+00:00</updated><title type='text'>HOWTO Unmap Ctrl-Alt-End in Xfce on Debian</title><summary type="text">Using Remote Desktop (via Citrix) to access a Windows server, and need to press Ctrl-Alt-End to send Ctrl-Alt-Del to change your password?By default, in Xfce Ctrl-Alt-End is mapped to/xfwm4/default/&amp;lt;Primary&amp;gt;&amp;lt;Alt&amp;gt;End&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;move_window_next_workspace_keywhich stops Citrix from sending it.To undo this mapping, you can go to:Start / Settings / Settings </summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/8824450736466038909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/8824450736466038909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/8824450736466038909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/8824450736466038909'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2020_12_01_archive.html#8824450736466038909' title='HOWTO Unmap Ctrl-Alt-End in Xfce on Debian'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-5211891295740638057</id><published>2020-06-19T19:06:00.000+01:00</published><updated>2020-06-19T19:06:12.246+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Citrix"/><title type='text'>Fixes for issues with Citrix Workspace on Linux</title><summary type="text">This is for /etc/icaclient/config/All_Regions.ini

This is in:


;
; These settings control the keyboard settings
;
[Virtual Channels\Keyboard]



;
; To enable alt-tab in remote machine
; https://discussions.citrix.com/topic/403094-alttab-will-not-work-on-citrix-workspace-for-linux-to-windows/
; TransparentKeyPassthrough=Remote
;
TransparentKeyPassthrough=Remote



;
; Remote losing keyboard but</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/5211891295740638057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/5211891295740638057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/5211891295740638057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/5211891295740638057'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2020_06_01_archive.html#5211891295740638057' title='Fixes for issues with Citrix Workspace on Linux'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-7112853066102342005</id><published>2019-07-09T15:11:00.000+01:00</published><updated>2019-07-09T15:14:15.413+01:00</updated><title type='text'>Changing owner of mounted NFS filesystem.</title><summary type="text">Mounting an NFS filesystem from Windows on Linux.

The user:group of the files was being set to nobody:nobody

To override this, you can use:

rw,vers=3

in your options in /etc/fstab

Found this on:

https://serverfault.com/questions/520276/nfs-user-mapping

Using mount we could see that the mount options were defaulting to nfsv4 (which doesn&#39;t support changing the user? - it certainly doesn&#39;t </summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/7112853066102342005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/7112853066102342005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/7112853066102342005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/7112853066102342005'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2019_07_01_archive.html#7112853066102342005' title='Changing owner of mounted NFS filesystem.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-8048009167333534328</id><published>2019-02-13T12:30:00.003+00:00</published><updated>2019-02-13T12:32:10.862+00:00</updated><title type='text'>Python configure on Debian: compiling and linking against OpenSSL doesn&#39;t work</title><summary type="text">If you are running ./configure on a new download of Python and you get this:


checking whether compiling and linking against OpenSSL works... no


And you already have openssl installed...

Make test after a build returns:


Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the </summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/8048009167333534328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/8048009167333534328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/8048009167333534328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/8048009167333534328'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2019_02_01_archive.html#8048009167333534328' title='Python configure on Debian: compiling and linking against OpenSSL doesn&#39;t work'/><author><name>John</name><uri>http://www.blogger.com/profile/14879927957880032034</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-1892842947331316361</id><published>2019-01-24T08:54:00.000+00:00</published><updated>2019-01-24T08:54:06.254+00:00</updated><title type='text'>Treat period as a word boundary in vim</title><summary type="text">If cw in vim is selecting past &#39;.&#39; to the next whitespace or non-alpha (for which I would usually use cW)

If you do set you may find:


    iskeyword=@,48-57,_,192-255,.


If you do :set iskeyword-=.; it will remove it.

NB: This is probably file-type specfic (e.g. in RedHat while editing a .sh file, but not when invoking vim with no file)

If you don&#39;t want to set this globally, you can use :</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/1892842947331316361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/1892842947331316361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/1892842947331316361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/1892842947331316361'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2019_01_01_archive.html#1892842947331316361' title='Treat period as a word boundary in vim'/><author><name>John</name><uri>http://www.blogger.com/profile/14879927957880032034</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-6086908096302159390</id><published>2018-09-17T17:24:00.000+01:00</published><updated>2018-09-17T17:24:01.790+01:00</updated><title type='text'>Simple bash &quot;UUID&quot; generator</title><summary type="text">If you need a UUID-like string in a bash script, e.g. for the message part boundary in an email, this is probably about as simple as you can get:


#!/bin/bash

MD5SUM=/usr/local/gnu/bin/md5sum
DATE=/usr/local/gnu/bin/date

MD5=$($DATE +&#39;%s.%N&#39;|$MD5SUM)

B1=${MD5:0:8};B2=${MD5:8:4};B3=${MD5:12:4};B4=${MD5:16:4};B5=${MD5:20:12}

BOUNDARY=&quot;$B1-$B2-$B3-$B4-$B5&quot;


</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/6086908096302159390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/6086908096302159390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/6086908096302159390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/6086908096302159390'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2018_09_01_archive.html#6086908096302159390' title='Simple bash &quot;UUID&quot; generator'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-8716390606239795187</id><published>2018-08-15T17:12:00.002+01:00</published><updated>2018-08-15T17:12:49.235+01:00</updated><title type='text'>Using lftp to mirror sub directories.</title><summary type="text">lftp can nicely mirror sub directories... just do:


mirror --use-pget-n=5


</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/8716390606239795187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/8716390606239795187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/8716390606239795187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/8716390606239795187'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2018_08_01_archive.html#8716390606239795187' title='Using lftp to mirror sub directories.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-5455907372424495589</id><published>2018-05-30T13:55:00.001+01:00</published><updated>2018-05-30T13:55:19.301+01:00</updated><title type='text'>perl5/perlbrew/etc/bashrc: line 103: perlbrew: command not found</title><summary type="text">If you&#39;re getting

/path/to/perl5/perlbrew/etc/bashrc: line 103: perlbrew: command not found

Try checking to see you don&#39;t have a $HOME/.perlbrew/init file which points to an old version of perlbrew which has been deleted.
</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/5455907372424495589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/5455907372424495589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/5455907372424495589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/5455907372424495589'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2018_05_01_archive.html#5455907372424495589' title='perl5/perlbrew/etc/bashrc: line 103: perlbrew: command not found'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-5764072137833541958</id><published>2018-05-30T12:32:00.000+01:00</published><updated>2018-05-30T12:32:09.887+01:00</updated><title type='text'>Say no to whichcraft</title><summary type="text">Interesting and useful history and alternatives to which command

https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then/85250#85250

</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/5764072137833541958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/5764072137833541958' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/5764072137833541958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/5764072137833541958'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2018_05_01_archive.html#5764072137833541958' title='Say no to whichcraft'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-3109114863753795218</id><published>2018-05-15T12:19:00.000+01:00</published><updated>2018-05-15T12:22:37.764+01:00</updated><title type='text'>Lazy way to resort a table in SQL</title><summary type="text">When you have a query and you want to sort the output but the query is too complex to see what to sort on.
(say your output column isn&#39;t a selected column, but rather generated data)


select
case
        when substring(t1.some_column, 1, 1) = &#39;#&#39; then rtrim(t1.some_column)
        when &#39;some_group&#39; in (&#39;group_a&#39;, &#39;group_b&#39;, &#39;group_c&#39;, &#39;group_d&#39;, &#39;group_e&#39;) then  &#39;#&#39; + rtrim(t1.some_column)
</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/3109114863753795218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/3109114863753795218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/3109114863753795218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/3109114863753795218'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2018_05_01_archive.html#3109114863753795218' title='Lazy way to resort a table in SQL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-6328017563694678216</id><published>2018-04-24T08:50:00.000+01:00</published><updated>2018-05-15T12:24:12.100+01:00</updated><title type='text'>Sybase column name and datatype of all columns in a table</title><summary type="text">

SELECT syscolumns.name, systypes.name FROM sysobjects
JOIN syscolumns ON sysobjects.id = syscolumns.id
JOIN systypes ON systypes.type = syscolumns.type
AND systypes.usertype = syscolumns.usertype
WHERE sysobjects.name LIKE &#39;my_table&#39;




https://stackoverflow.com/a/28940121/224625
</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/6328017563694678216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/6328017563694678216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/6328017563694678216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/6328017563694678216'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2018_04_01_archive.html#6328017563694678216' title='Sybase column name and datatype of all columns in a table'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-5848775533070979107</id><published>2017-10-31T17:56:00.000+00:00</published><updated>2017-10-31T17:56:13.654+00:00</updated><title type='text'>Show seconds in ls -l output on Solaris 10</title><summary type="text">If you need to show the seconds (and year) in the output of ls -l on Solaris:



$ ls -le /path/to/file

</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/5848775533070979107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/5848775533070979107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/5848775533070979107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/5848775533070979107'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2017_10_01_archive.html#5848775533070979107' title='Show seconds in ls -l output on Solaris 10'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-159046264591276058</id><published>2016-08-26T14:06:00.004+01:00</published><updated>2016-08-26T14:56:16.352+01:00</updated><title type='text'>Ardour4, JACK, ALSA... Rosegarden, qsynth etc...</title><summary type="text">When you install Ardour on a fresh Debian install you will probably find that the sound isn&#39;t working.

Here&#39;s what I did to get it going.

  sudo aptitude install ardour

I also installed these.

  sudo aptitude install Qtractor
  sudo aptitude install audacity

I installed these 2 to convert mp3s to ogg so I could import them.
Qtractor lets you import mp3 but ardour doesn&#39;t

  sudo aptitude </summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/159046264591276058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/159046264591276058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/159046264591276058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/159046264591276058'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2016_08_01_archive.html#159046264591276058' title='Ardour4, JACK, ALSA... Rosegarden, qsynth etc...'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-1926837417478022970</id><published>2016-02-02T12:56:00.000+00:00</published><updated>2016-09-06T17:11:05.764+01:00</updated><title type='text'>Installing 7-Zip plugin in MobaXterm</title><summary type="text">I like MobaXterm&amp;nbsp;http://mobaxterm.mobatek.net/

I like 7-Zip http://p7zip.sourceforge.net/
(In my previous version of this How-To I used 7-Zip for Windows from http://www.7-zip.org/ ) to open the downloaded archive, but now you can do it all from within mobaxterm.

To get 7-Zip working in MobaXterm I downloaded the 7-Zip package from a cygwin mirror... (find your closest one at https://</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/1926837417478022970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/1926837417478022970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/1926837417478022970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/1926837417478022970'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2016_02_01_archive.html#1926837417478022970' title='Installing 7-Zip plugin in MobaXterm'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-3309332978998288286</id><published>2014-08-13T09:48:00.001+01:00</published><updated>2014-08-13T09:50:00.914+01:00</updated><title type='text'>/etc/acct/holidays</title><summary type="text">In /var/adm/messages on Solaris:


Aug 13 02:30:16 hostname adm: [ID 702911 daemon.notice]
Aug 13 02:30:16 hostname last message repeated 4 times
Aug 13 02:30:16 hostname adm: [ID 702911 daemon.notice] **********  SYSTEM ACCOUNTING STARTED Wed Aug 13 02:30:16 BST 2014  **********
Aug 13 02:30:16 hostname adm: [ID 702911 daemon.notice]
Aug 13 02:30:16 hostname last message repeated 4 times
Aug 13 </summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/3309332978998288286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/3309332978998288286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/3309332978998288286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/3309332978998288286'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2014_08_01_archive.html#3309332978998288286' title='/etc/acct/holidays'/><author><name>John</name><uri>http://www.blogger.com/profile/14879927957880032034</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-1631332567759603350</id><published>2014-07-17T17:00:00.002+01:00</published><updated>2014-07-17T17:02:30.290+01:00</updated><title type='text'>To replace text in vim with line number</title><summary type="text">e.g.:


mv file_abc.jpg pic.XX.jpg
mv random.jpg   pic.XX.jpg
mv other.jpg    pic.XX.jpg
mv name.jpg     pic.XX.jpg



If you do this:


:%s/XX/\=line(&quot;.&quot;)/


</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/1631332567759603350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/1631332567759603350' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/1631332567759603350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/1631332567759603350'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2014_07_01_archive.html#1631332567759603350' title='To replace text in vim with line number'/><author><name>John</name><uri>http://www.blogger.com/profile/14879927957880032034</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-7068392934044974886</id><published>2014-07-01T00:12:00.005+01:00</published><updated>2014-07-01T00:12:52.654+01:00</updated><title type='text'>Make SSH ignore SSH key</title><summary type="text">Make SSH ignore your SSH key, not prompt for a passphrase, only use password:


$ ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no destination.host



</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/7068392934044974886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/7068392934044974886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/7068392934044974886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/7068392934044974886'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2014_07_01_archive.html#7068392934044974886' title='Make SSH ignore SSH key'/><author><name>John</name><uri>http://www.blogger.com/profile/14879927957880032034</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-7891704533728186700</id><published>2014-05-28T12:07:00.000+01:00</published><updated>2014-05-28T12:12:46.361+01:00</updated><title type='text'>find things...</title><summary type="text">Find files that are not world readable and make them readable:

sudo find . -type f \! -perm -4 -exec chmod o+r {} +


Find files that are not group readable

find . -type f \! -perm -40 -ls


Find files that are group writable

find . -type f -perm -20 -ls


Find files that are world writable

find . -type f -perm -2 -ls


</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/7891704533728186700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/7891704533728186700' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/7891704533728186700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/7891704533728186700'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2014_05_01_archive.html#7891704533728186700' title='find things...'/><author><name>John</name><uri>http://www.blogger.com/profile/14879927957880032034</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-501402734989532646</id><published>2014-05-14T19:11:00.001+01:00</published><updated>2014-05-28T12:10:58.768+01:00</updated><title type='text'>To find if a Solaris host is running on an LDom</title><summary type="text">If the file /usr/sbin/virtinfo exists, run:



$ /usr/sbin/virtinfo -a



If you run it as root it will also tell you the hostname of the Control domain and the Chassis serial#.

 </summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/501402734989532646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/501402734989532646' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/501402734989532646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/501402734989532646'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2014_05_01_archive.html#501402734989532646' title='To find if a Solaris host is running on an LDom'/><author><name>John</name><uri>http://www.blogger.com/profile/14879927957880032034</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-2862139925694763427</id><published>2013-11-14T17:03:00.001+00:00</published><updated>2013-11-14T17:04:28.753+00:00</updated><title type='text'>list to csv...</title><summary type="text">
ls | paste -s -d&#39;%&#39; - | sed &#39;s/\(^\|$\)/&quot;/g;s/%/&quot;,&quot;/g&#39;

</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/2862139925694763427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/2862139925694763427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/2862139925694763427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/2862139925694763427'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2013_11_01_archive.html#2862139925694763427' title='list to csv...'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-8931275889163795771</id><published>2013-10-11T17:22:00.003+01:00</published><updated>2013-11-14T16:57:01.629+00:00</updated><title type='text'>web client in pure bash</title><summary type="text">

( printf &quot;GET /path/to/file HTTP/1.0\n\n&quot; 1&gt;&amp;0 ; cat ) 0&amp;lt;&gt; /dev/tcp/&amp;lt;HOSTNAME&gt;/80


Thanks David!
</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/8931275889163795771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/8931275889163795771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/8931275889163795771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/8931275889163795771'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2013_10_01_archive.html#8931275889163795771' title='web client in pure bash'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-6044660493104058854</id><published>2013-08-13T16:41:00.001+01:00</published><updated>2013-08-13T18:03:51.516+01:00</updated><title type='text'>Get Windows hostname from IP address via Samba</title><summary type="text">You can tell it&#39;s likely to be a Windows box by what ports it has open...

&quot;The target host OS can often be guessed simply by looking at the ports which are open. Microsoft Windows machines often have TCP ports 135 and 139 open. Windows 2000 and newer also listen on port 445.&quot; ( from: http://nmap.org/book/osdetect-other-methods.html )

Once you&#39;ve identified it&#39;s a Windows host, how can you tell </summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/6044660493104058854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/6044660493104058854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/6044660493104058854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/6044660493104058854'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2013_08_01_archive.html#6044660493104058854' title='Get Windows hostname from IP address via Samba'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-924968708555432960</id><published>2013-08-06T12:11:00.000+01:00</published><updated>2013-08-06T12:11:38.268+01:00</updated><title type='text'>swap usage...</title><summary type="text">To find out how much swap processes are using...

On Solaris:


ps -eo vsz,rss,pid,args | sort -n



top -b -o size




Total swap used by pid 


pmap -S $PID | tail -1 | awk &#39;{print $4}&#39; 
20236




Don&#39;t really want to use these:


prstat -s rss 
prstat -s size




Size: total virtual memory size of the process, including all mapped files and devices. 
RSS: should be the resident set size, but </summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/924968708555432960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/924968708555432960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/924968708555432960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/924968708555432960'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2013_08_01_archive.html#924968708555432960' title='swap usage...'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-4842712281644605101</id><published>2013-07-08T13:19:00.003+01:00</published><updated>2013-07-08T13:21:16.480+01:00</updated><title type='text'>Copy history from one git repo to another</title><summary type="text">
cd repository 
git log --pretty=email --patch-with-stat --reverse -- path/to/file_or_folder &amp;gt; ../patch 
cd ../other_repository 
git am &amp;lt; ../patch

</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/4842712281644605101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/4842712281644605101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/4842712281644605101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/4842712281644605101'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2013_07_01_archive.html#4842712281644605101' title='Copy history from one git repo to another'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186417.post-1432764136141595549</id><published>2013-05-02T17:48:00.002+01:00</published><updated>2013-05-02T17:52:34.703+01:00</updated><title type='text'>Portable, super efficient alternative to seq</title><summary type="text">Ever missed seq on a non-gnu system (like older Solaris)?

Here&#39;s an extremely portable alternative which turns out to be much more efficient too!


yes &#39;&#39; | head -100000 | cat -n


Phil explained that the efficiency is to do with the way that cat does its line numbering (by incrementing the ASCII characters rather than counting numbers and converting them to characters) Thanks Phil!

</summary><link rel='replies' type='application/atom+xml' href='http://serfgeek.blogspot.com/feeds/1432764136141595549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186417/1432764136141595549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/1432764136141595549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186417/posts/default/1432764136141595549'/><link rel='alternate' type='text/html' href='http://serfgeek.blogspot.com/2013_05_01_archive.html#1432764136141595549' title='Portable, super efficient alternative to seq'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>