sed command를 통해서 아래 포함할문구1 또는 포함할문구2 가 있는 라인은 삭제 하고 /data/result/filename명으로 저장한다. #!/bin/bash for file in ls * do if [ -f $file ] then tmpfile="$file" mkdir -p /data/result wc -l $file >> /data/result/result.log sed -e '/{포함할문구1}\|{포함할문구2}/d' $file > /data/result/$tmpfile wc -l /data/result/$file >> /data/result/result.log fi done sed command를 통해서 아래 {team\\\":{\\\"number\\\":\\\"[0-9]\{16\}} 을..
사전 조건 유저가 직접 패스워드 변경 해야됨 명령어 통제를 그룹 단위로 하고 있음 초기 로그인 시도 시 무조건 패스워드 변경 해야됨 신규 유저 생성시 패스워드 만료 작업이 자주 누락되어 사용함 #!/bin/bash read -p "Your name : " user PS3='Please Select team: ' select team in "a-team" "b-team" do echo "$team - $user " useradd -g $team $user echo 'password1!' | passwd --stdin $user passwd --expire $user break done exit 0
#!/bin/bash today=$(date +%Y%m%d') rbashuser=$(cat /etc/passwd |grep rbash |awk 'BEGIN {FS = ":"} {print $1}'|egrep -v "root|nike|secupang") for user in $rbashuser do auser=$user buser=$(lastlog -u $user |grep $user |awk '{print $1}') #buser=$(lastlog -b 90 -u $user |grep $user |awk '{print $1}') if [ "$auser" != "$buser" ] then echo $auser login !! else echo $auser nologin 90day change nologin ..
ad join이 불가한 상황에 유저 패스워드 만료 및 어카운트 비활성화 관련 bash scripts cron해서 사용 하면 됨 #!/bin/bash today=$(date +%Y%m%d) expiredate=$(date -d "+1 week" "+%Y-%m-%d") rbashuser=$(cat /etc/passwd |grep rbash |awk 'BEGIN {FS = ":"} {print $1}'|egrep -v "root|admin") for user in $rbashuser do auser=$user buser=$(lastlog -b 90 -u $user |grep $user |awk '{print $1}') if [ "$auser" != "$buser" ] then resultuser=$(chage..
fendys.myqnapcloud.com kafka -> local server file input { kafka { bootstrap_servers => "fendys.myqnapcloud.com:9094" topics_pattern => ".*" codec => json group_id => "all-log-idc-backup" consumer_threads => "10" } } filter { if [service][name] { if [service][type] { mutate { replace => { "[@metadata][archive][namespace]" => "%{[service][name]}/%{+YYYY}-%{+MM}-%{+dd}-%{[service][name]}-%{[service..
Issue How to disable NUMA in Red Hat Enterprise Linux system? Resolution Adding the "numa=off" to kernel command line in boot loader configuration and rebooting the system will disable NUMA awareness. Examples: RHEL6 or earlier (/boot/grub/grub.conf) Raw title Red Hat Enterprise Linux AS (2.6.9-55.EL) root (hd0,0) kernel /vmlinuz-2.6.9-55.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet numa=off i..
- Total
- Today
- Yesterday
- chrony
- centos7 ntp
- nxos ansible
- ILO
- 특정 라인삭제
- ISCSI 볼륨 RAC
- ios ansible
- dependency fail
- dl20 g9 centos7 설치
- cisco ansible
- linux7 ntp
- dl20
- CentOS 7 GUI
- cmd로 계정 생성
- shell connmad log
- linux command log
- 특정 문구 치환
- DL20 GEN9 장비에 CentOS 7
- 윈도우서버 계정 관려
- vm rac
- ipmi
- cmd로 윈도우 계정 관리
- ansible ios
- nutanix rac
- dl20 centos7
- ansible network
- 리눅스 커맨드 로그남기기
- windows.old 강제삭제
- cgroup
- 윈도우 cmd 계정 관리
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |