Hoffman2:Scripts:clean up.sh: Difference between revisions

From Center for Cognitive Neuroscience
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 13: Line 13:
<nowiki>*</nowiki> If you just want to see what files will be deleted without really deleting them, add --dryrun, e.g.
<nowiki>*</nowiki> If you just want to see what files will be deleted without really deleting them, add --dryrun, e.g.


  clean_up.sh -c --dryrun /PATH/TO/FOLDER
  clean_up.sh -f --dryrun /PATH/TO/FOLDER




Line 35: Line 35:


  clean_up.sh -c /PATH/TO/FOLDER
  clean_up.sh -c /PATH/TO/FOLDER




Log File:<br>
Log File:<br>
A log file will be generated under the folder where you run it, named as "clean_up_log.YYYYMMDD_ss"
A log file will be generated under the folder where you run it, named as "clean_up_log.YYYYMMDD_ss"<br>


<nowiki>*</nowiki> What if I want to recover some of the deleted files?
<nowiki>*</nowiki> What if I want to recover some of the deleted files?


This script will moved selected files to $SCRATCH folder. In case you want to recover files being cleaned up by this script, you can look for them in your $SCRATCH/$DATE/TARGET/FOLDERS folder
This script will move selected files to your $SCRATCH folder. In case you want to recover files being removed by this script, you can look for them under your $SCRATCH/YYYYMMDD_mmssms/ folder.

Latest revision as of 22:24, 10 June 2025

This script is used to clean up the following files.


1. feat folders (+.feat)
2. FSL stdout and stderr files (such as *.e28678.8, *.o4436)
3. files end with .con .grp .Icon .mat
4. tsplot
5. core.[0-9]

Load the module first

module load ccnscripts

* If you just want to see what files will be deleted without really deleting them, add --dryrun, e.g.

clean_up.sh -f --dryrun /PATH/TO/FOLDER


For clean up feat folders,

clean_up.sh -f /PATH/TO/FOLDER

For .o and .e files

clean_up.sh -o /PATH/TO/FOLDER

For .con .grp .Icon .mat

clean_up.sh -g /PATH/TO/FOLDER

For tsplot

clean_up.sh -t /PATH/TO/FOLDER

For core.[0-9]

clean_up.sh -c /PATH/TO/FOLDER


Log File:
A log file will be generated under the folder where you run it, named as "clean_up_log.YYYYMMDD_ss"

* What if I want to recover some of the deleted files?

This script will move selected files to your $SCRATCH folder. In case you want to recover files being removed by this script, you can look for them under your $SCRATCH/YYYYMMDD_mmssms/ folder.