tar로 파일을 생성할 때 현재 날짜를 포함한 파일 이름이 필요할 경우가 있다. 예전에는 shell script에서 현재 날짜를 변수로 생성하여 했었다. 찾아보니 바로 만들 수 있는 방법이 있었다.
tar --exclude /home/byun1114/R/x86_64-pc-linux-gnu-library -vcf /home/byun1114/truenas/WORK/Z_BACKUP/R/R-`date +%F`.tar /home/byun1114/R
tar로 파일을 생성할 때 현재 날짜를 포함한 파일 이름이 필요할 경우가 있다. 예전에는 shell script에서 현재 날짜를 변수로 생성하여 했었다. 찾아보니 바로 만들 수 있는 방법이 있었다.
tar --exclude /home/byun1114/R/x86_64-pc-linux-gnu-library -vcf /home/byun1114/truenas/WORK/Z_BACKUP/R/R-`date +%F`.tar /home/byun1114/R