[LINUX] Convenient command combination

Convenient settings for ~ / .bashrc

Personally favorite settings

After cd, show the absolute path and directory contents

cdpwdls


cdpwdls ()                                                                                          
{                                                                                                   
    \cd $@ && pwd -P && ls                                                                             
 } 
alias cd='cdpwdls'

If head or tail, display with less

hless


 hless ()                                                                                            
 {                                                                                                   
   \head $@ | less                                                                                 
 }   

tless


tless ()                                                                                            
 {                                                                                                   
     \tail $@ | less                                                                                 
} 

When the model goes down and I want to see SYSOUT, I think that there are many SYSOUT * and the file size is large and it is troublesome. tless SYSOUT* If you hit it, it will tail and less at once. Convenient!

qsub option settings

When throwing a job, if you want to hold the previous job until the end, here are some frequently used options.

The first argument is the job ID of the previous job, and the second argument is the job script you want to throw next.

qsubok


qsubok ()
{
    \qsub -W depend=afterok:$1 $2
}

qsubany


qsubany ()
{
    \qsub -W depend=afterany:$1 $2
}

qsubfail


qsubfail ()
{
    \qsub -W depend=afternotok:$1 $2
}

Recommended Posts

Convenient command combination
Convenient diff command usage notes
[Linux convenient command] Try inserting exa
[Linux convenient command] Try inserting csview
[Linux convenient command] Try inserting bat
Linux command # 4
Linux command # 3
Command memorandum
command prompt
vim command
sed command
Linux command # 5
grep command
command memo
[Linux convenient command] Try to insert vivid
top command
Command memorandum
Command memo
mv command
seq command