grep -r pattern /path 2> /dev/null
ack-grep pattern /path 2> /dev/null
Example: ack-grep "bcl2fastq*" ~/ 2>/dev/null
Notes:
Normally you wouldn't want to actually search EVERYTHING on the system. Linux uses file nodes for everything, so some "files" are not things you would want to search. For example /dev/sda is the physical block device for your first hard drive. You probably want to search the mounted file systems not the raw disk device. Also there is /dev/random which spits out random data every time you read it. Searching that doesn't make a lot of sense. The /proc file system is also problematic in your case.
Don't search at root, only search the places that might be useful. Search /home or /usr or /etc separatly. The info you are looking for is likely of a specific type, so it's likely to be in a specific folder anyway. Configuration settings should be in /etc. Your personal data files should be in /home. Limiting search to a major area like this will greatly reduce your problems with recursive greps.
Exclude problematic areas using --exclude-dir and a set of things you know you don't needlike this: grep -r --exclude-dir /proc --exclude-dir /dev --exclude-dir /tmp --exclude-dir /lost+found
-I to exclude binary
ls -l /dev/disk/by-uuid/
kill -9 $(jobs -p)
bsub -P bbc -Is -q interactive bash
ack-grep Select_DE_gene_basd_on_Feature ~/GOSJ/R/*.R
find /media/H_driver/ -name "*.tiff" 2>/dev/null
find /scratch/projects/bbc/Project/DI/Output_rMATS_filtered -type f -name "*.bai" -exec rm -i {} \;
find /media/H_driver/PJ/Results -depth -type d -empty -delete
find /media/H_driver/PJ/Results -depth -type d -empty
Setup path for R installation(add the following settings to $HOME/.bashrc, then source $HOME/.bashrc)
export PATH=$HOME/packages/bin:$PATH
export LD_LIBRARY_PATH=$HOME/packages/lib:$LD_LIBRARY_PATH
export CFLAGS="-I$HOME/packages/include"
export LDFLAGS="-L$HOME/packages/lib"
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:$HOME/packages/include"
df -h | grep ^/dev
du -h | sort -rh | head
du -h /media/H_driver/Aimin_project/ | sort -rh | head
or
du -sh ~/pegasus/aiminy_project
du -ha | sort -h
pip install --install-option="--prefix=$HOME/3UTR-Seq/inst/RSeQC" RSeQC
pip install --upgrade --user pysam
sudo apt-get install di
di
-
brew install ssh-copy-id
-
ssh-keygen
-
ssh-copy-id -i .ssh/id_rsa.pub [email protected]
-
download the latest version of FUSE for OS X at the FUSE for OS X web site
-
install FUSE for OS X on my laptop by double-clicking the disk image, then double-clicking on the installation package. There is pretty standard Mac OS X stuff; it went without a hitch.
-
download the latest version of SSHFS for OS X at the FUSE for OS X web site.
-
install SSHFS by double-clicking on the downloaded file. if you ran into an issue here where Mac OS X refused to install the package because SSHFS comes from an “unidentified developer.” To get around this, you need to override the Gatekeeper in Mac OS X, which can be as simple as right-clicking on the package and selecting “Open” from the context menu.
-
Both FUSE for OS X and SSFHS were now installed.
-
mkdir ~/pegasus
-
Type the following commands
sshfs -p 22 [email protected]:/scratch/projects/bbc ~/pegasus -oauto_cache,reconnect,defer_permissions,noappledouble,negative_vncache,volname=pegasus
To mount another directory
mkdir ~/MyHomeAtPegasus
sshfs -p 22 [email protected]:/nethome/axy148 ~/MyHomeAtPegasus -oreconnect,defer_permissions,noappledouble,volname=MyHomeAtPegasus
mkdir ~/pegasus2
sshfs -p 22 [email protected]:/projects2/med/bbc ~/pegasus2 -oauto_cache,reconnect,defer_permissions,noappledouble,negative_vncache,volname=pegasus2
mkdir HomeAtCluster
sshfs -p 22 [email protected]:/home/ay64w HomeAtCluster -oauto_cache,reconnect,defer_permissions,noappledouble,negative_vncache,volname=HomeAtCluster
mkdir ProjectAtCluster
sshfs -p 22 [email protected]:/project ProjectAtCluster -oauto_cache,reconnect,defer_permissions,noappledouble,negative_vncache,volname=ProjectAtCluster
- if you want Unmounting, type "umount ~/pegasus"
- Type the following commands
ssh-copy-id -i .ssh/id_rsa.pub [email protected]
mkdir /media/pegasus
sshfs [email protected]:/scratch/projects/bbc /media/pegasus
- If you have an erro like the following:
sshfs [email protected]:/scratch/projects/bbc /media/pegasus
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
try this:
aiminyan@aiminyan-Precision-Tower-5810:~$ sshfs [email protected]:/scratch/projects/bbc /media/pegasus -o nonempty
ln -s "Dropbox (BBSR)" Dropbox
# Show example
cd Dropbox
ln -s ~/MyHomeAtPegasus/Danny_chip3/sample_infor_Danny_chip3.txt
highligth sample_infor_Danny_chip3.txt file, right click, then select "Smart Sync" then select "Online Only"
After finish sync, you can
umount ~/MyHomeAtPegasus
ps aux | grep -ie download | awk '{print $2}' | xargs kill -9
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda3 during installation
UUID=fb33babc-a08c-4387-bf77-72bc46ccc66b / ext4 errors=remount-ro 0 1
//scccresfs.cgcent.miami.edu/Bioinformatics /media/H_driver cifs iocharset=utf8,credentials=/home/aiminyan/.smbcredentials,uid=1000,user 0 0
//sccceqfs.cgcent.miami.edu/BBSR$ /media/bbc_driver cifs iocharset=utf8,credentials=/home/aiminyan/.smbcredentials,uid=1000,user 0 0
//umeqstor-nas.cgcent.miami.edu/LOCKHART /media/Lockhart cifs iocharset=utf8,credentials=/home/aiminyan/.smbcredentials,uid=1000,user 0
/swapfile none swap sw 0 0
sudo apt install docker.io
sudo usermod -aG docker $USER
system("echo $PATH") on rstudio Console, copy
emacs .Renviron
add
PATH = usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/aiminyan/miniconda3/bin
restart rstudio,
then it should work
conda install -c cyclus java-jdk
conda install -c anaconda openjdk
module unload python/2.7.3
conda install -c bioconda gatk4
gatk-launch
tar -pczvf /root/etc.tar.gz /etc
//scccresfs.cgcent.miami.edu/bioinformatics_2 /media/H_driver2 cifs iocharset=utf8,credentials=/home/aiminyan/.smbcredentials,uid=1000,user 0 0
sudo lshw -short -C cpu
sudo lshw -short -C memory
vim file
:%s/<Ctrl-V><Ctrl-M>/\r/g
:wq
bsub -Is -q interactive -W 8:00 -n1 -R "span[hosts=1] rusage[mem=4096]" /bin/bash
fn+shift+left arrow equals HOME
fn+shift+right arrow equals END
when in screen on linux, to move up and down
control+A, then esc, then you can move using up and down arrow
To get back, presss esc
to get screen list
control + A, and shift "