Linux Basic
-
리눅스에서 압축 풀때Linux Basic 2024. 7. 25. 00:13
출처 : https://www.jqshop.net/bbs/board.php?bo_table=resource&wr_id=72&sca=LINUX 제이큐샵 - 홈페이지제작 쇼핑몰제작 솔루션제작제이큐샵은 지난 10년 동안 홈페이지제작, 쇼핑몰제작 및 웹프로그램 개발 등의 한길을 걸어온 전문 웹에이전시 입니다.www.jqshop.net 리눅스 사용하다보면 압축 푸는것을 터미널로 풀다 보니..... 알아두면 좋다. 1. ZIP - 압축하기 zip -rF (압축파일명).zip (압축할 폴더 또는 파일) r : 서브 디렉터리 까지 압축 F : 한글 이름을 가진 파일까지 압축 zip filename.zip ./* //현재 폴더에 전부를 압축할때 ./*는 현재 폴더 전부를 의미 zip ..
-
sftp server 설정Linux Basic 2024. 5. 15. 01:45
# 패키지 개수 확인dpkg -l | wc -l #ftp 깔려있는거 확인dpkg -l | grep ftp # 사용자 확인nl /etc/passwd51 ftp:x:131:138:ftp daemon,,,:/srv/ftp:/usr/sbin/nologin #사용자 계정 만들기useradd -m -s /bin/bash -d /home/ace ace passwd ace tail -3 /etc/passwd #접속할때sftp 계정@localhost sftp IP 차단 허용 방법sudo vim /etc/hosts.deny위처럼 sshd: ALL을 작성하면 hosts.allow 에서 입력한 허가된 IP를 제외한 모든 접속은 차단된다. https://minimin2.tistory.com/149 [Linux/Ubuntu] ..
-
gcc & LD_PRELOAD & 동적 라이브러리 & makefile -2Linux Basic 2024. 4. 29. 00:15
앞에서 배운 동적 라이브러리와 LD_PRELOAD를 이용해서 곱하기를 나누기로 변경하는 재미있는 놀이를 해볼 생각이다. 1. 파일 준비 아래 처럼 4개의 파일을 만들어 준다.div.h, div.c, mul.h, mul.c//div.c#include int div(int b){ int a; for(a = 1; a int mul(int b){ int a; for(a = 1; a https://m.blog.naver.com/whtie5500/221692793640 [C] pthread란? pthread예제오늘은 pthread입니다! 아마 운영체제시간에 배울텐데요~ 저는 운영체제수업시간에 배웠거든요! 흠 오늘은 ...blog.naver.com 위 사이트를 참조해서 thread 를 수정해..
-
gcc & 정적 라이브러리 & 동적 라이브러리 & makefile - 1Linux Basic 2024. 4. 27. 16:14
리눅스에서 남의 코드를 보다보면 makefile이라는것을 보게 되고 gcc라는것을 접하게 된다. 그러면 .so 파일 .a .o 파일 등 생소한 파일이 보이게 되고.... 뭔 말인가 싶고.... 아래 글을 참조해서 하나하나 차근 차근 따라 해보자 그러면 리눅스와 GCC 와 Makefile이 익숙해 질것이다. 우선 실습 위주로 작성하고 다음 글에는 명령어에 대해서 적어보자! https://access.redhat.com/documentation/ko-kr/red_hat_enterprise_linux/8/html/developing_c_and_cpp_applications_in_rhel_8/creating-libraries-with-gcc_creating-c-or-cpp-applications#creating..
-
cmake on linuxLinux Basic 2023. 9. 17. 03:02
리눅스에서 cmake를 많이 사용하지만 남이 만들어 놓은 것을 사용하지 내가 직접 쓸일은 없었다. 그래서 막연하게 사용하던 중 설명이 잘된 강의가 있어서 연결함. 요즘 cmake가 점점 더 널리 퍼지는것 같음. 이유는 딥러닝이 리눅스에서 잘 돌아가고 리눅스에서는 cmake 가 편하다 보니 이렇게 되는것 같음. https://www.youtube.com/watch?v=LxEFn-cGdE0&t=12s https://www.youtube.com/watch?v=GkZaAS2Gp-4&t=357s 요즘 검증을 많이 하다보니 tesla 는 어떤 요구사항이 있을까 해서 알아봄. Knowledge and experience with automation and build tools is a plus (Jenkins, Do..
-
onnx docker 사용하기Linux Basic 2023. 7. 16. 02:34
특정 onnx runtime을 사용할때 도커 환경이 필요하다. 이때 도커를 사용하는것이 좋은것 같다. 아래 사이트에서 https://github.com/microsoft/onnxruntime/tree/main/dockerfiles#cuda 이렇게 치면 도커가 설치됨. sudo docker build -t onnxruntime-cuda -f ./dockerfiles/Dockerfile.cuda . 도커 명령어 모음. http://jmlim.github.io/docker/2019/02/24/docker-command/ 버전 확인 https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html NVIDIA - CUDA Instruction..
-
ONNX 무작정 따라하기Linux Basic 2023. 7. 16. 02:33
https://pytorch.org/docs/master/onnx.html#example-alexnet-from-pytorch-to-onnxtorch.onnx — PyTorch master documentationtorch.onnx ONNX exporter. Open Neural Network eXchange (ONNX) is an open standard format for representing machine learning models. The torch.onnx module can export PyTorch models to ONNX. The model can then be consumed by any of the many runtimes that supppytorch.orgpytorch에 onn..
-
LD_PRELOADLinux Basic 2023. 2. 26. 02:14
리눅스에 LD_PRELOAD라는 예약어가 있다. 동적 라이브러리를 먼저 참조할 수 있도록 제공하는 기능이다. 정적 라이브러리는 내가 해보니 잘 안된다. 이론적으로 생각해봐도 정적 라이브러리 형식으로 사용하면 힘들어 보이기는 하다. 이유는 동적 라이브러리를 바꿔치기하는것인데 정적 라이브러리 사용하면 상관 없지 않나? 이런 생각이 들어서 이다. Q. 그래서 해당기능은 뭐에 유용한가? 코드를 수정하지 않고 외부에서 변경하고 싶을때 가능한 기능임. https://www.opensourceforu.com/2011/08/lets-hook-a-library-function/ Let's Hook a Library Function - LINUX For You If you want to change the way a li..