Unix Utilities

From Rous
Jump to: navigation, search

Contents

Using your web folder on rous

Task: Create zip file of CEL files for loading into Biobase

Syntax:

zip -r group.zip *.CEL

Notes: "group" is name of sample set.


Task: Create symbolic link

Syntax:

ln -s /Path/To/Linked/Material Material_link

Notes: cd to the location where you want the link to reside before executing the command.


Notes: find syntax notes

  • In order to use find to find files that contain the text "Pattern" in their name execute:
find /Searchpath -name "*Pattern*"
  • to operate on those files execute:
find /Searchpath -name "*Pattern*" -exec du -h {} \;
  • To find files:
find . -type f -exec ls -la {} \;
  • Permissions can be changed:
find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \;


  • To find directories:
find . -type d -exec ls -la {} \;

Task: Sync user IDs between rous and mac hosts

In order to take advantage of NFS mounted filesystems in the BCC, userID (not just username) must agree between the systems.

Due to the way accounts are created, both usernames and userIDs on rous match those within the MIT system.

The userIDs on our mac hosts were randomly assigned and are different from rous/mit.

1) Determine your userID on rous by executing the command:

hesinfo username passwd

the output will look like this:

charliew:*:25679:101:Charles A Whittaker,,E18-366,6173240337,:/mit/charliew:/bin/athena/tcsh

where uid = 25679

2) Login to mac host with CoVNC, open workgroup manager GUI, note your original uid on the system and change uid to match hesinfo output by typing the correct UID in the appropriate box.

3) after some time, all your files on the mac host with have the original uid and no username listed as owner.

4) to correct ownership of your files, run the following find commands:

on ccrbi1 and ccrbi2 (maybe 10.5+)

find /Searchpath -uid originalUID -exec chown username {} \;

##Note: there is a space between the "}" and the "\".

on luria (pre-10.5)

find /Searchpath -user originalUID -exec chown username {} \;


Modify .bash_profile on a mac

edit .bash_profile to read:

  1. User specific aliases and functions

alias ls="ls -lat"

Using screen

  • "screen" - initiate the session
  • "ctrl-a d" detaches from screen
  • "screen -r" reattaches to screen
  • "exit" to quit screen session
  • new instrutions
    • ctrl-a is replaced by ` when adam applies config file
    • name a screen session with
screen -S sessionName
    • list screen sessions
screen -ls
    • check out .screenrc file in home for more info

rsync-ing a folder with an exclude

  • from the run folder Intensities directory

rsync -av --exclude=GERALD* BaseCalls /path/to/destination/

Personal tools