Difference between revisions of "Miscellaneous"

From Briki
Jump to: navigation, search
(sunday school curiculum guides http://ssagovt.tripod.com/sunday-school-lesson-jan.14-2007.html sunday school lesson jan.14 2007sia song lyrics sunday http://ssagovt.tripod.com/sunday-sport.com.html su)
(screen: Start a screen session with a title)
 
(22 intermediate revisions by 6 users not shown)
Line 1: Line 1:
sunday school curiculum guides http://ssagovt.tripod.com/sunday-school-lesson-jan.14-2007.html sunday school lesson jan.14 2007sia song lyrics sunday http://ssagovt.tripod.com/sunday-sport.com.html sunday sport.comtn. larbor sunday http://ssagovt.tripod.com/sunday-news-manchester.nh.html sunday news manchester.nhleslie w. sunday http://ssagovt.tripod.com/www.sunday-baroque.com.html www.sunday baroque.comword sunday.com http://ssagovt.tripod.com/nbc.com-sunday-morning-programs.html nbc.com sunday morning programssunday brunch. ramsey http://ssagovt.tripod.com/sunday-buffet-charleston-s.c.html sunday buffet charleston s.cpa.dubois tricounty sunday newspaper http://ssagovt.tripod.com/leslie-w.-sunday.html leslie w. sundaysunday river. com http://ssagovt.tripod.com/bbc1-programme-sunday-15.04.07.html bbc1 programme sunday 15.04.07sunday brunch redwing mn http://ssagovt.tripod.com/sunday-brunch-whately-ma.html sunday brunch whately manbc sunday today.com http://ssagovt.tripod.com/daughtry-sunday-bloody-sunday.mp3.html daughtry sunday bloody sunday.mp3
+
== Find open files on mount ==
 +
  sudo lsof +f -- /var/media
 +
Also useful in case you're trying to work out why an unmounted partition is still showing as 'in use' in tools like e2fsck:
 +
  sudo fuser -v -m /dev/sdX1
 +
 
 +
== List hardware details ==
 +
<pre>
 +
sudo lshw -businfo
 +
</pre>
 +
 
 +
== Add swap space ==
 +
* Create swap partition using ''fdisk''
 +
 
 +
* Create swap filesystem
 +
<pre>
 +
sudo mkswap <device>
 +
</pre>
 +
 
 +
* Activate swap
 +
<pre>
 +
sudo swapon <device>
 +
</pre>
 +
 
 +
* Modify /etc/fstab to allow swap to be activated at boot time
 +
 
 +
== Change userid/groupid for an existing user/group ==
 +
* Change groupid in /etc/group
 +
* Run '''sudo grpconv''' to update /etc/gshadow
 +
* Change userid in /etc/passwd (and also the primary groupid for any changed groupids)
 +
* Run '''sudo pwconv''' to update /etc/shadow
 +
 
 +
== Music Naming Strategy ==
 +
{| border="1"
 +
!Type!!Title!!TrackNum!!Artist!!Sort Artist!!Album Artist!!Sort Album Artist!!Album!!Sort Album!!Disc!!Genre!!Compilation
 +
|-
 +
!!!TIT2!!TRCK!!TPE1!!TSOP!!TPE2!!TSO2!!TALB!!TSOA!!TPOS!!TCON!!TCMP
 +
|-
 +
|Albums||Title||TrackNum||Artist||'''BLANK'''||''Directory1''||'''BLANK''' / ''Number word''||Album||''Directory2 [Disc n]''||Disc||Genre||'''BLANK'''
 +
|-
 +
|Compilations||Title||TrackNum||Artist||'''BLANK'''||'''Various Artists'''||'''ZZZD'''||Album||''Directory2 [Disc n]''||Disc||Genre||'''1'''
 +
|-
 +
|Singles||Title||'''BLANK'''||Artist||'''BLANK'''||'''Various Artists'''||'''ZZZH'''||'''Singles'''||'''BLANK'''||'''BLANK'''||Genre||'''1'''
 +
|-
 +
|Soundtracks||Title||TrackNum||Artist||'''BLANK'''||'''Various Artists'''||'''ZZZL'''||Album||''Directory2 [Disc n]''||Disc||'''Soundtrack (24)'''||'''1'''
 +
|-
 +
|Spoken||Title||TrackNum||Artist||'''BLANK'''||''Directory1''||'''ZZZP'''||Album||''Directory2 [Disc n]''||Disc||Genre||'''BLANK'''
 +
|-
 +
|Fun||Title||'''BLANK'''||Artist||'''BLANK'''||'''BLANK'''||'''ZZZT'''||'''Fun'''||'''BLANK'''||'''BLANK'''||'''Comedy (57)'''||'''1'''
 +
|}
 +
 
 +
* '''Albums''': eyeD3 --to-v2.3 --set-text-frame="TSOP:" --set-text-frame="TPE2:$artist" --set-text-frame="TSO2:" --set-text-frame="TSOA:$album" --set-text-frame="TCMP:" $file
 +
* '''Compilations''': eyeD3 --to-v2.3 --set-text-frame="TSOP:" --set-text-frame="TPE2:Various Artists" --set-text-frame="TSO2:ZZZD" --set-text-frame="TSOA:$album" --set-text-frame="TCMP:1" $file
 +
* '''Singles''': eyeD3 --to-v2.3 --set-text-frame="TRCK:" --set-text-frame="TSOP:" --set-text-frame="TPE2:Various Artists" --set-text-frame="TSO2:ZZZH" --set-text-frame="TALB:Singles" --set-text-frame="TSOA:" --set-text-frame="TPOS:" --set-text-frame="TCMP:1" $file
 +
* '''Soundtracks''': eyeD3 --to-v2.3 --set-text-frame="TSOP:" --set-text-frame="TPE2:Various Artists" --set-text-frame="TSO2:ZZZL" --set-text-frame="TSOA:$album" --set-text-frame="TCMP:1" $file
 +
 
 +
=== File Ownership ===
 +
* chown root:admin $file
 +
* chmod 664 $file
 +
* chown root:admin $dir
 +
* chmod 775 $dir
 +
 
 +
== Measuring LAN performance ==
 +
Host 1 (linux):
 +
<pre>
 +
iperf -s -p 8123
 +
</pre>
 +
Host 2 (mac):
 +
<pre>
 +
~/bin/iperf -c host1 -p 8123
 +
</pre>
 +
 
 +
== screen: Start a screen session with a title ==
 +
  screen -S <title>

Latest revision as of 08:59, 3 November 2021

Find open files on mount

 sudo lsof +f -- /var/media

Also useful in case you're trying to work out why an unmounted partition is still showing as 'in use' in tools like e2fsck:

 sudo fuser -v -m /dev/sdX1

List hardware details

sudo lshw -businfo

Add swap space

  • Create swap partition using fdisk
  • Create swap filesystem
sudo mkswap <device>
  • Activate swap
sudo swapon <device>
  • Modify /etc/fstab to allow swap to be activated at boot time

Change userid/groupid for an existing user/group

  • Change groupid in /etc/group
  • Run sudo grpconv to update /etc/gshadow
  • Change userid in /etc/passwd (and also the primary groupid for any changed groupids)
  • Run sudo pwconv to update /etc/shadow

Music Naming Strategy

Type Title TrackNum Artist Sort Artist Album Artist Sort Album Artist Album Sort Album Disc Genre Compilation
TIT2 TRCK TPE1 TSOP TPE2 TSO2 TALB TSOA TPOS TCON TCMP
Albums Title TrackNum Artist BLANK Directory1 BLANK / Number word Album Directory2 [Disc n] Disc Genre BLANK
Compilations Title TrackNum Artist BLANK Various Artists ZZZD Album Directory2 [Disc n] Disc Genre 1
Singles Title BLANK Artist BLANK Various Artists ZZZH Singles BLANK BLANK Genre 1
Soundtracks Title TrackNum Artist BLANK Various Artists ZZZL Album Directory2 [Disc n] Disc Soundtrack (24) 1
Spoken Title TrackNum Artist BLANK Directory1 ZZZP Album Directory2 [Disc n] Disc Genre BLANK
Fun Title BLANK Artist BLANK BLANK ZZZT Fun BLANK BLANK Comedy (57) 1
  • Albums: eyeD3 --to-v2.3 --set-text-frame="TSOP:" --set-text-frame="TPE2:$artist" --set-text-frame="TSO2:" --set-text-frame="TSOA:$album" --set-text-frame="TCMP:" $file
  • Compilations: eyeD3 --to-v2.3 --set-text-frame="TSOP:" --set-text-frame="TPE2:Various Artists" --set-text-frame="TSO2:ZZZD" --set-text-frame="TSOA:$album" --set-text-frame="TCMP:1" $file
  • Singles: eyeD3 --to-v2.3 --set-text-frame="TRCK:" --set-text-frame="TSOP:" --set-text-frame="TPE2:Various Artists" --set-text-frame="TSO2:ZZZH" --set-text-frame="TALB:Singles" --set-text-frame="TSOA:" --set-text-frame="TPOS:" --set-text-frame="TCMP:1" $file
  • Soundtracks: eyeD3 --to-v2.3 --set-text-frame="TSOP:" --set-text-frame="TPE2:Various Artists" --set-text-frame="TSO2:ZZZL" --set-text-frame="TSOA:$album" --set-text-frame="TCMP:1" $file

File Ownership

  • chown root:admin $file
  • chmod 664 $file
  • chown root:admin $dir
  • chmod 775 $dir

Measuring LAN performance

Host 1 (linux):

iperf -s -p 8123

Host 2 (mac):

~/bin/iperf -c host1 -p 8123

screen: Start a screen session with a title

 screen -S <title>