Backup folder

cp -r kraken2_gtdb_214 kraken2_gtdb_214_backup

rsync -avh --progress kraken2_gtdb_214/ kraken2_gtdb_214_backup/

Merge mutiple file but with only one column name

awk 'FNR==1 && NR!=1 {next} {print}' all_file_path/*.csv > merged_file.csv

Delete jobs in batches

qstat -u $USER | grep "bindash" | awk '{print $1}' | xargs -r qdel

Remove the prefix of the files names in the same folder

for file in single_fasta/all_circular_plasmid.part_*; do mv "$file" "${file/all_circular_plasmid.part_/}"; done

Check the top x files names in a folder without open it.

ls -U path/to/your/folder | head -n 10

find path/to/your/folder -maxdepth 1 -mindepth 1 | head -n 10

Move files to another folder.

find chromosome phage plasmid -type f -name "*defense_finder_systems.tsv" -exec cp {} all_systems_tsv_merge/ \\;

find file with same prefix and merge them only keep one column name.

awk 'FNR==1 && NR!=1 {next} 1' $(find chromosome phage plasmid -type f -name "*_padloc.csv") > merged_padloc.csv