Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Delete
- kubespray
- mariadb
- GitHub
- docker-compose
- golang
- vscoe
- docker
- time_zone
- kubernetes #container
- GORM
- db
- html
- NGINX
- kubernetes
- nodemon
- docker install
- npm
- node
- Git
- k8s
- linux
- ansible
- ubuntu
- Container
- regexp
- bash
- kube
- go
- 쿠버네티스
Archives
- Today
- Total
목록crontab (1)
Deve.haeri
[linux] 날짜별 디렉토리 생성하기
월별 디렉토리를 생성한 후 하위 디렉토리에 일별로 디렉토리를 만드는 방법이다. [월별 디렉토리 생성]/[일별 디렉토리 생성] 의 형식으로 생성 월별 디렉토리 생성 스크립트 #!/bin/bash month=`date +%m` export month mkdir /home/ubuntu/animalinfo_wordpress/wordpress_data/wp-content/uploads/$month/ date 명령어를 입력한 출력 결과에서 해당 월의 정보만 가져오고 싶어서 "date +%m" 이렇게 작성했다. export 명령어를 사용하여 다른 스크립트에서도 해당 변수를 사용할 수 있게 했다. 일별 디렉토리 생성 스크립트 #!/bin/bash day=`date +%Y%m%d` mkdir /home/ubuntu/an..
linux
2022. 7. 21. 12:27