Actions

Difference between revisions of "Linux"

From ACL@NCU

Line 3: Line 3:
<font size=5>
<font size=5>
= tcsh =
= tcsh =
*Find files  
#Find files  
<br />with defined stem pattern under multiple different folder
##with defined stem pattern under multiple different folder
<pre>
##<pre>
find */*/*anat+tlrc.*
##find */*/*anat+tlrc.*
</pre>
##</pre>


<br />find files with a suffix recursively under subdirectories
##find files with a suffix recursively under subdirectories
<pre>
<pre>
find . -name \*.mgz -print
find . -name \*.mgz -print
</pre>
</pre>


<br />delete or copy filenames from a "pattern" search  
##delete or copy filenames from a "pattern" search  
<pre>
<pre>
rm `find */*/*anat+tlrc.*`
rm `find */*/*anat+tlrc.*`

Revision as of 00:42, 18 January 2013

Useful tcsh and python commands

tcsh

  1. Find files
    1. with defined stem pattern under multiple different folder

##find */*/*anat+tlrc.* ##

    1. find files with a suffix recursively under subdirectories
find . -name \*.mgz -print
    1. delete or copy filenames from a "pattern" search
rm `find */*/*anat+tlrc.*`

python