Linux Notes - RobertRosca/MPhys-Project-Work GitHub Wiki

Linux-related notes

Misc

Storing aliases in ~/.bash_aliases

Use chmod +x to make .sh files actually executable

The export command in .sh files exports the variable to the sub-shell of the .sh file, have to use source instead of export to have the variables get exported to the current shell

If currently in the nuObservarionID folder, using ${PWD##*/} gives the name of the folder. So if in ~/Documents/nustar/nustar_archive/80001020002, entering ${PWD##*/} gives 80001020002: command not found

Follow https://kb.vmware.com/s/article/2045026 to enable symlinks for shared folders

glances for system status

VNCServer

Sticking to a block of vncserver displays, can pick display number with vncserver :#

To see the current ports: lsof -i -P | grep -i "listen"

To see currently running processes ps -ef | grep vnc (easier to grep $username as multiple vnc instances are running on the server usually)

Downloading Observations with wget

Use:

wget -m -e robots=off --no-parent https://heasarc.gsfc.nasa.gov/FTP/nustar/data/obs/00/8/80002017002/

Saving Images with Selected Region in DS9

ds9 /mnt/hgfs/.nustar_archive_cl/80102101004/pipeline_out/nu802101004A01_cl.evt -regions /mnt/hgfs/.nustar_archive_cl/80102101004/source.reg -saveimage /mnt/hgfs/.nustar_archive_cl/80102101004/obs_reg.png -quit