출처: https://answers.microsoft.com/en-us/windows/forum/all/restore-legacy-right-click-menu-for-file-explorer/a62e797c-eaf3-411b-aeec-e460e6e5a82a

 

리디렉션 중

 

login.microsoftonline.com

 

변경 전 변경 후

 

'더 많은 옵션 표시 Shift + F10' 없애기: 예전처럼 컨텍스트 메뉴를 다 보기 위해 되돌리기

 

1. 시작버튼의 오른쪽 마우스 클릭해서 Windows 터미널 (관리자)

2. 아래 명령을 윈도우 터미널에 붙여넣고 엔터

reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve

3. 윈도우 탐색기를 재시작하거나 리부팅

 

 

위 작업을 Windows 10, 11 기본 모양으로 다시 되돌리기

1. 시작버튼의 오른쪽 마우스 클릭해서 Windows 터미널 (관리자)

2. 아래 명령을 윈도우 터미널에 붙여넣고 엔터

reg.exe delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f

3. 윈도우 탐색기를 재시작하거나 리부팅

Posted by zennken

Linux

#!/bin/sh
BASEDIR=$(dirname "$0")

echo "$BASEDIR"

Windows

%~dp0: the full path of the directory in which the batch script resides.

 

You can specify the location of myLib.jar regardless of where the batch file is executed.

set JAVA_CMD="%JAVA_HOME%\bin\java" -XX:MaxPermSize=512m -Xms1g -Xmx4g -Duser.language=en
%JAVA_CMD% -jar %~dp0\myLib.jar %*
Posted by zennken

Unable to input "@" at HP UX

OS 2020. 3. 25. 15:03

https://www.unix.com/hp-ux/256104-after-using-line-breaks-particular-user-shell.html

// set to default values

stty sane

// change terminal control characters

stty erase "^h" intr "^c" kill "^u" susp "^z" eof "^d"

// see all values

stty -a 

Posted by zennken

When clearing routing table with "route -f", then 

  • Fail to ping 127.0.0.1 with general failure
  • Unable to use debugger at Eclipse: JDWP Transport dt_socket failed to initialize
My solution was
  1. Disable all NICs.
  2. Execute "route -f" again.
  3. Enable all NICs and input necessary information such as gate way.
  4. Reboot computer.
  5. Check 127.0.0.1 with "route print" command.
  6. Execute "ping 127.0.0.1" and confirm it works OK.


Posted by zennken
전 sed 대신 Perl 로..~ (ex : html 화일에 대해 EUC_KR 을 UTF-8 로 일괄 치환) find . -name '*.html' -exec perl -pi -e 's/EUC_KR/UTF-8/g' {} \; From free1002
Posted by zennken
출처: http://pangate.com/185

다음 예제는 *.c 파일 속에 있는 $1 문자열을 $2 문자열로 바꾼다.

ls_lst=`ls *.c`
for ls_one in ${ls_lst};  do
   echo '=[ '$ls_one' ]'

   sed -e "s%$1%$2%" $ls_one > $ls_one.temp
   sed -e "s%$1%$2%" $ls_one.temp > $ls_one
   rm -f $ls_one.temp
done

echo ' E N D'
Posted by zennken
From: http://www.cpuug.org/index.php?topic=132.0

#!/bin/sh
#=====================================================
#
# newdf - An improved human readable display of the HP-UX
# display filesystems command.
#
# Version 1.1
# Author: Scott Buffington
#
# Change History:
# Scott Buffington - 10/30/2006 - Created
# Scott Buffington - 03/18/2008 - Fixed Linewrap issue.
#
# License: GPL, http://www.gnu.org/copyleft/gpl.html
#
#=====================================================

awkscript="/tmp/newdf.$$"

trap "rm -f $awkscript" EXIT

cat << 'EOF' > $awkscript
function showunit(size)
{ mb = size / 1024; prettymb=(int(mb * 100)) / 100;
  gb = mb / 1024; prettygb=(int(gb * 100)) / 100;

  if ( substr(size,1,1) !~ "[0-9]" ||
       substr(size,2,1) !~ "[0-9]" ) { return size }
  else if ( mb < 1) { return size "K" }
  else if ( gb < 1) { return prettymb "M" }
  else              { return prettygb "G" }
}

BEGIN {
  printf "%-27s %8s %8s %8s %8s  %-s\n",
        "Filesystem", "Size", "Used", "Avail", "Capacity", "Mounted"
}

!/Filesystem/ {

  size=showunit($2);
  used=showunit($3);
  avail=showunit($4);

  printf "%-27s %8s %8s %8s %8s  %-s\n",
        $1, size, used, avail, $5, $6
}
EOF

df -Pk | grep -v "libc_psr.so.1" | sed -e :a -e '$!N;s/\n / /;ta' -e 'P;D' | awk -f $awkscript

Posted by zennken

AIX Debugging

OS/AIX 2009. 12. 8. 13:26

AIX 5.2 performance tools update, Part 2

http://www.ibm.com/developerworks/systems/articles/AIX5.2PerfTools.html
Posted by zennken

vim에서 UTF-16 읽기

OS/Unix 2009. 1. 19. 10:34
:e ++enc=utf-16
Posted by zennken
용도
해당 디렉토리 하의 특정 확장자를 가진 파일들을 찾아 라인을 카운트한다.

사용법
전체 라인 카운트 및 전체 파일 갯수 확인하기
SourceLineCounter.sh file_extension
ex)
./SourceLineCounter.sh java
Total lines
18976
Total files
81

각 파일별 라인 확인하기
FileFinder.sh java file_extension
ex)
 ./FileFinder.sh java
146 ./ApplicationActionBarAdvisor.java
18 ./ApplicationWorkbenchAdvisor.java
...

Shell script

FileFinder.sh: 현재 디렉토리 하의 특정 확장자를 가진 파일을 찾고 각 파일의 라인 갯수를 출력한다.
#!/bin/bash

for file in $( find ./ -name "*.$1" ); do wc -l "$file"; done

SourceLineCounter.sh: FileFinder를 불러서 전체 라인수와 파일 갯수를 계산한다.
#/bin/bash

echo "Total lines"
./FileFinder.sh $1  | cut -d" " -f1 | awk '{ print "a = a + " $1 "; a" }' | bc -l | tail -1

echo "Total files"
./FileFinder.sh $1 | wc -l

좀 더 좋은 방법도 있겠지만, 여기에 투자할 시간이 부족한 관계로 이만.




Posted by zennken
12

zennken

달력