Skip to content

YoungHaKim7/linux_command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

link










(250225์กฐํšŒ๊ธฐ์ค€)์ฐธ๊ณ ๋กœ ๋ ˆ๋”ง์˜ Subreddit ๊ตฌ๋…์ž์ˆ˜๋Š” ๋Œ€๋žต ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. ์ถœ์ฒ˜

r/Linux 370,000
r/Ubuntu 108,000
r/LinuxMint 23,957
r/Fedora 18,925
r/ManjaroLinux 11,087
r/openSUSE 7,359
r/SolusProject 5,965
r/NixOS 3,051
r/voidlinux 1,802
r/MXLinux 478

ใ€Ž์œ ๋‹‰์Šค ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด ์‚ฌ์ „ใ€์˜ ๊ฐœ์ •ํŒ- linux command์ด์ •๋ฆฌ

  • ใ€Ž์œ ๋‹‰์Šค ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด ์‚ฌ์ „ใ€์˜ ๊ฐœ์ •ํŒ. ๋น ๋ฅด๊ฒŒ ์ฐพ์•„ ์‰ฝ๊ฒŒ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์œ ๋‹‰์Šค ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด ์‚ฌ์ „์ด๋‹ค. ์ผ๋ฐ˜ ๋ช…๋ น์–ด, ๋ฐ๋ชฌ ๋ฐ ์„œ๋ฒ„์„ค์ •, RPM & DEB, VI ์—๋””ํ„ฐ, SVN & Git, ์‰˜ ์Šคํฌ๋ฆฝํŠธ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์œผ๋กœ ๋ถ„๋ฅ˜ํ•˜์—ฌ ์ž์„ธํžˆ ๋‹ค๋ฃฌ๋‹ค.
  • https://terms.naver.com/list.naver?cid=59321&categoryId=59321

How to install build-essential? [duplicate]

sudo apt-get update
sudo apt-get install build-essential

https://askubuntu.com/questions/398489/how-to-install-build-essential

How to add PPA on Ubuntu?

sudo apt-get install software-properties-common

update

sudo apt update
sudo apt full-upgrade -y

// ํ•œ์ค„๋กœ

sudo apt update && sudo apt full-upgrade -y 

apt ์ฐพ๊ธฐ

apt-cache search openjdk-17

apt-cache search ์ฐพ๊ณ ์ž ํ•˜๋Š”๊ฑฐ ์“ฐ๊ธฐ


python pip์„ค์น˜ํ• ๋•Œ ์˜ค๋ฅ˜๋‚˜๋Š”๊ฑฐ ํ•ด๊ฒฐ externally-managed-environment

  • ์—๋Ÿฌ๋‚ด์šฉ
sudo pip3 install meson
error: externally-managed-environment

ร— This environment is externally managed
โ•ฐโ”€> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
$python3 -m pip config set global.break-system-packages true
Writing to /home/g/.config/pip/pip.conf


Linux Command ๋งŽ์ด ์“ฐ๋Š”๊ฑฐ

IMG_8383


Rust Install

Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, you need to source
the corresponding env file under $HOME/.cargo.

This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env"            # For sh/bash/zsh/ash/dash/pdksh
source "$HOME/.cargo/env.fish"  # For fish

Cmake๋‹ค์Œ ๋ฒ„์ ผ meson ์ด์ œ๋Š” meson์œผ๋กœ ๋„˜์–ด๊ฐ€๋‚˜?

sudo apt-get update

sudo apt-get -y install python3-pip


pip3 --version

sudo apt install build-essential

sudo apt install ninja-build

meson install(Successfully installed meson-1.3.2)

sudo apt remove -y meson
sudo pip3 install --upgrade meson
meson build .

cd build

meson test

ninja     

sudo ninja install 
  • cmake์“ฐ๋Š” ์ˆœ์„œ
mkdir build
cd build
cmake ..
make

Clipboard ๋จนํ†ต์ผ๋•Œ ์„ค์น˜[๐Ÿ”]

Vulkan Install(22.04)[๐Ÿ”]

sudo apt-get update

sudo apt-get -y install vulkan-tools

wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.275-jammy.list https://packages.lunarg.com/vulkan/1.3.275/lunarg-vulkan-1.3.275-jammy.list
sudo apt update
sudo apt install vulkan-sdk

 nvm install --lts
Installing latest LTS version.
Downloading and installing node v20.11.0...
Downloading https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz...
############################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v20.11.0 (npm v10.2.4)



โฏ node --version
v20.11.0

-nodejs 18 ๋ฒ„์ ผ ์„ค์น˜

sudo apt update && sudo apt upgrade

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -

sudo apt-get install nodejs
sudo apt-get install python3-pip

node.js ์—…๋ฐ์ดํŠธ(3๊ฐœ์˜ ๋ช…๋ น์–ด)|๐Ÿ”|

  • node.js ์—…๋ฐ์ดํŠธ (3๊ฐœ์˜ ๋ช…๋ น์–ด๋ฅผ ์ฐจ๋ก€์ฐจ๋ก€ ์ž…๋ ฅํ•˜์„ธ์š”.)
sudo npm cache clean --force
sudo npm install -g n
sudo n stable
sudo n stable
  installing : node-v22.17.0
       mkdir : /usr/local/n/versions/node/22.17.0
       fetch : https://nodejs.org/dist/v22.17.0/node-v22.17.0-linux-x64.tar.xz
     copying : node/22.17.0
   installed : v22.17.0 (with npm 10.9.2)

Note: the node command changed location and the old location may be remembered in your current shell.
         old : /usr/bin/node
         new : /usr/local/bin/node
If "node --version" shows the old version then start a new shell, or reset the location hash with:
hash -r  (for bash, zsh, ash, dash, and ksh)
rehash   (for csh and tcsh)

netstat ์—†์œผ๋ฉด ์„ค์น˜[๐Ÿ”]

  • netstat
sudo apt update
sudo apt install net-tools -y

Valgrind ์ตœ์‹  ๋ฒ„์ ผ ์„ค์น˜ํ•˜๊ธฐ[๐Ÿ”]

//๋‹ค์šด ๋ฐ›๊ณ  ์••์ถ• ํ’€๊ณ 
./configure

make

make install
// or
sudo make install

Nerd Font ์„ค์น˜ install[๐Ÿ”]

linux PATH[๐Ÿ”]

How To Set Your $path Variable In Linux

To make sure the user is following all of the steps, enable ash_profile. Setting the $PATH setting for all users on the system with the following command is as simple as that. Please navigate to vi /etc/profile.

vi /etc/profile

https://www.systranbox.com/how-to-set-path-in-kali-linux/


linux์—์„œ ์œˆ๋„์šฐ ์‹คํ–‰ํ•˜๊ธฐ


Rust๋กœ ๋งŒ๋“  CPU ๊ฐ์‹œ ytop

  • A TUI system monitor written in Rust
cargo install ytop

Rust๋กœ ๋งŒ๋“  ๋„คํŠธ์›Œํฌ top ๊ฐ™์€๊ฑฐ

  • A network diagnostic tool
cargo install trippy

์˜ค๋ฅ˜ ํ•ด๊ฒฐ History

๋ฆด๋ฆฌ์Šค๊ฐ€ ์ˆ˜๋ช… ์ข…๋ฃŒ(EOL)์— ๋„๋‹ฌํ•œ ๊ฒฝ์šฐ "apt-get ์—…๋ฐ์ดํŠธ< ์ค‘์— 404 ์˜ค๋ฅ˜๋ฅผ ๋ฐฉ์ง€ํ•˜๋ ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด /etc/apt/sources.list๋ฅผ ์ˆ˜์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. /์ฝ”๋“œ>". CODENAME์„ ์‚ฌ์šฉ ์ค‘์ธ Ubuntu ๋ฆด๋ฆฌ์Šค์˜ ์ฝ”๋“œ๋ช…์œผ๋กœ ๋ฐ”๊พธ์‹ญ์‹œ์˜ค.

cd /etc/apt/souces.list.d 
Failed to fetch https://master.dl.sourceforge.net/project/d-apt/dists/d-apt/main/binary-amd64/Packages  Certificate verifica
tion failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the
 certificate verification. [IP: 2xx.1xx.3x.x2 xx3]
E: Some index files failed to download. They have been ignored, or old ones used instead.

tar์••์ถ• ํ•ด์ œ & ์••์ถ•ํ•˜๊ธฐ

https://eehoeskrap.tistory.com/555

zig cc ๋งฅ์—์„œ ์œˆ๋„์šฐ ํŒŒ์ผ ๋งŒ๋“ค๊ธฐ ใ…‹ ์ปดํŒŒ์ผ ํ•˜๋Š” ๋ฐฉ๋ฒ• ใ…‹

  • zig cc -o main.exe main.c -target x86_64-windows-gnu zig cc ์›ƒ๊ธฐ๋„ค ใ…‹
$ file main.exe
main.exe: PE32+ executable (console) x86-64, for MS Windows


$ ls
README.md build.sh  delete.sh main.c    main.exe  main.pdb


$ zig cc -o main.exe main.c -target x86_64-windows-gnu
Compile C Objects [106/406] mingw_vsprintfw.c... /Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_wvfscanf.c:167:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
    s->seen_eof = 1;
                ^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_wvfscanf.c:176:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
    else s->seen_eof = 1;
                     ^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_wvfscanf.c:1628:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
  ifp.is_string = 1;
                ^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_vfscanf.c:158:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
    s->seen_eof = 1;
                ^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_vfscanf.c:167:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
    else s->seen_eof = 1;
                     ^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_vfscanf.c:1629:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-con]
  ifp.is_string = 1;
                ^ ~
Compile C Objects [175/406] wcstoumax.c... 3 warnings generated.
3 warnings generated.

eza ์‚ฌ์šฉ๋ฒ•(exa์—์„œ eza๋กœ ๋„˜์–ด๊ฐ)[๐Ÿ”]

$ eza -la -TL2
drwxrwxrwx    - y 26 Feb 12:17 .
drwxrwxrwx    - y 13 Mar 15:29 โ”œโ”€โ”€ .git
.rw-rw-rw-   92 y 26 Feb 11:42 โ”‚  โ”œโ”€โ”€ config
.rw-rw-rw-   73 y 26 Feb 11:42 โ”‚  โ”œโ”€โ”€ description
.rw-rw-rw-   23 y 26 Feb 11:42 โ”‚  โ”œโ”€โ”€ HEAD
drwxr-xr-x    - y 26 Feb 11:42 โ”‚  โ”œโ”€โ”€ hooks
drwxr-xr-x    - y 26 Feb 11:42 โ”‚  โ”œโ”€โ”€ info
drwxrwxrwx    - y 26 Feb 11:42 โ”‚  โ”œโ”€โ”€ objects
drwxrwxrwx    - y 26 Feb 11:42 โ”‚  โ””โ”€โ”€ refs
.rw-rw-rw-    8 y 26 Feb 11:42 โ”œโ”€โ”€ .gitignore
drwxrwxrwx    - y 26 Feb 12:17 โ”œโ”€โ”€ .vscode
.rw-rw-rw- 1.9k y 26 Feb 12:17 โ”‚  โ””โ”€โ”€ launch.json
.rw-rw-rw-  154 y 26 Feb 11:42 โ”œโ”€โ”€ Cargo.lock
.rw-rw-rw-  179 y 26 Feb 11:42 โ”œโ”€โ”€ Cargo.toml
drwxrwxrwx    - y 13 Mar 16:01 โ”œโ”€โ”€ src
.rw-rw-rw- 2.0k y  7 Mar 10:27 โ”‚  โ”œโ”€โ”€ lib.rs
.rw-rw-rw-  138 y 26 Feb 12:28 โ”‚  โ””โ”€โ”€ main.rs
drwxrwxrwx    - y 26 Feb 11:54 โ””โ”€โ”€ target
.rw-rw-rw- 1.0k y 13 Mar 16:01    โ”œโ”€โ”€ .rustc_info.json
.rw-rw-rw-  177 y 26 Feb 11:42    โ”œโ”€โ”€ CACHEDIR.TAG
drwxrwxrwx    - y 26 Feb 12:28    โ”œโ”€โ”€ debug
drwxrwxrwx    - y 26 Feb 11:54    โ””โ”€โ”€ nextest
  • (eza)icons์œผ๋กœ ์ด์˜๊ฒŒ ๋ณด๊ธฐ
    • eza --icons
eza --icons
๎š‹ Cargo.lock  ๎š‹ Cargo.toml  ๎—ฟ src  ๎—ฟ target

file ์‚ฌ์šฉ๋ฒ•[๐Ÿ”]

  • file file ๋’ค์— ํŒŒ์ผ๋ช…์„ ๋ˆ„๋ฅด๋ฉด ์–ด๋–ป๊ฒŒ ์‹คํ–‰๋˜๊ณ  ์ž์„ธํ•œ ์‚ฌํ•ญ์„ ์•Œ์ˆ˜ ์žˆ๋‹ค.
$ file a.out
a.out: Mach-O 64-bit executable arm64


$ ls
README.md a.out     build.sh  delete.sh main.c


$ zig cc main.c


$ file build.sh
build.sh: Bourne-Again shell script text executable, ASCII text

uname ์œผ๋กœ ๋‚ด ์ปดํ“จํ„ฐ ์‚ฌ์–‘ ๋ณด์—ฌ์ค„ ๋•Œ ๊ตฟ[๐Ÿ”]

$ uname -a
Darwin g-y-MacBookPro.local 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 arm64

bash ๋ช…๋ น์–ด ํžˆ์Šคํ† ๋ฆฌ ๊ด€๋ฆฌ - readline ์‚ฌ์šฉ๋ฒ• ๋ฐ line ํŽธ์ง‘, reverse search ๋“ฑ ๋‹จ์ถ•ํ‚ค ์š”์•ฝ[๐Ÿ”]

https://www.lesstif.com/system-admin/bash-readline-line-reverse-search-6717494.html

alias ์‚ฌ์šฉ ๋ฐฉ๋ฒ• ๋“ฑ๋ก & ์‚ญ์ œ[๐Ÿ”]

https://withcoding.com/121

ls ์‚ฌ์šฉ๋ฒ•

  • ์šฉ๋Ÿ‰ ๋ณด๊ธฐ ์ข‹๊ฒŒ MB๋กœ ํ‘œ์‹œํ•ด์„œ ๋ณด๊ธฐ
ls -lah

lsd ์‚ฌ์šฉ๋ฒ•

lsd
๎žจ Cargo.lock  ๎žจ Cargo.toml  ๏„• examples  ๏€– LICENSE-MIT  ๎˜‰ README.md  ๏„• resources  ๏„ก src  ๏„• target


lsd -a
๏„• .   ๎˜• .editorconfig  ๎—ฝ .github     ๎žจ Cargo.lock  ๏„• examples     ๎˜‰ README.md  ๏„ก src
๏„• ..  ๎—ป .git           ๏‡“ .gitignore  ๎žจ Cargo.toml  ๏€– LICENSE-MIT  ๏„• resources  ๏„• target


lsd -l
.rw-r--r-- globalyoung staff  31 KB Tue Sep 12 22:04:07 2023 ๎žจ Cargo.lock
.rw-r--r-- globalyoung staff 725 B  Tue Sep 12 22:03:49 2023 ๎žจ Cargo.toml
drwxr-xr-x globalyoung staff 192 B  Tue Sep 12 22:03:49 2023 ๏„• examples
.rw-r--r-- globalyoung staff 1.0 KB Tue Sep 12 22:03:49 2023 ๏€– LICENSE-MIT
.rw-r--r-- globalyoung staff 2.4 KB Tue Sep 12 22:03:49 2023 ๎˜‰ README.md
drwxr-xr-x globalyoung staff 160 B  Tue Sep 12 22:03:49 2023 ๏„• resources
drwxr-xr-x globalyoung staff 256 B  Tue Sep 12 22:03:49 2023 ๏„ก src
drwxr-xr-x globalyoung staff 160 B  Tue Sep 12 22:04:21 2023 ๏„• target

https://github.com/lsd-rs/lsd


find๋กœ ํŒŒ์ผ, ํด๋” ์ฐพ์•„์„œ ์ง€์šฐ๊ธฐ[๐Ÿ”Top]

  • ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ ํ•˜์œ„์—์„œ ๋””๋ ‰ํ† ๋ฆฌ์— ์žˆ๋Š” ".DS_Store" ๋ชจ๋“  ํŒŒ์ผ ์‚ญ์ œ
find . -type f -name ".DS_Store" -exec rm {} \;


# fd-find(rust๋กœ ๋งŒ๋“  find)  ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ ํ•˜์œ„์—์„œ ๋””๋ ‰ํ† ๋ฆฌ์— ์žˆ๋Š” "justfile"  ๋ชจ๋“  ํŒŒ์ผ ์‚ญ์ œ(-exec๋ฅผ -x ๋ฐ”๊พธ๋‹ˆ ๋œ๋‹ค.)
fd justfile -x rm {} \;

https://shutcoding.tistory.com/entry/LINUX-FIND-%EB%A1%9C-%ED%8C%8C%EC%9D%BC%ED%8F%B4%EB%8D%94-%EC%B0%BE%EA%B8%B0-%EC%A7%80%EC%9A%B0%EA%B8%B0

https://gracefulprograming.tistory.com/86

find์—์„œ ์—…๊ทธ๋ ˆ์ด๋“œ ๋œ fd (Rust๋กœ ๋งŒ๋“ฌ)[๐Ÿ”]

https://github.com/sharkdp/fd

find๋กœ ์‹คํ–‰ํŒŒ์ผ๋งŒ ๊ฒ€์ƒ‰ํ•˜๊ธฐ[๐Ÿ”]

  • LinuxOS
find . -type f -executable -print -exec rm {} \;
./main
  • macOS
find . -type f -perm +111 -print


# ์‹คํ–‰ํŒŒ์ผ๋งŒ ๊ฒ€์ƒ‰ํ•ด์„œ ๊ทธ๊ฒƒ๋งŒ ์ง€์šฐ๊ธฐ

find . -type f -perm +111 -print -exec rm -rf {} \;

https://stackoverflow.com/questions/4458120/search-for-executable-files-using-find-command

find ์šฉ๋Ÿ‰ ์ˆœ์œผ๋กœ ์ •๋ ฌํ•ด์„œ ๊ณจ๋ผ์„œ ์ง€์šฐ๊ธฐ[๐Ÿ”]

find ./* -type -f -name '*.jpg' -size +512k -size -1024k -exec rm -rf {} \;


# => ํ˜„์žฌ ๊ฒฝ๋กœ์˜ ํŒŒ์ผ ์ค‘์— ํŒŒ์ผ ํ™•์žฅ์ž๊ฐ€ jpg์ด๋ฉด์„œ, ์‚ฌ์ด์ฆˆ๊ฐ€ 512kbyte ์ด์ƒ, 1024kbyte ์ดํ•˜์ธ ๊ฒƒ๋“ค์„ ๋ชจ๋‘ ์‚ญ์ œํ•œ๋‹ค.

์‹คํ–‰ ํŒŒ์ผ๋งŒ ๊ณจ๋ผ์„œ ์ง€์šฐ๊ธฐ Makefile(delete execute file)[๐Ÿ”]

- macOS ```find . -type f -perm +111 -print -exec rm -rf {} \;```
- LinuxOS ```find . -type f -executable -print -exec rm {} \;```
- WindowsOS ```Get-ChildItem -Filter *.exe -Recurse -Force | Remove-Item -Recurse -Force```
```Makefile
clean:
		find . -type f -perm +111 -print -exec rm -rf {} \;
rm:
		find . -type f -executable -print -exec rm {} \;

find | grep์กฐํ•ฉโค๏ธ๋‚ด ํด๋”์—์„œ ํ•˜์œ„ ํด๋”๊นŒ์ง€ ํŒŒ์ผ ์•ˆ์— ๋‚ด๊ฐ€ ์›ํ•˜๋Š” "println" ๋“ค์–ด๊ฐ„ ํŒŒ์ผ๋ช…๊ณผ ๋ช‡๋ฒˆ์งธ ์ค„์ธ์ง€ ๋‹ค ๋‚˜์˜ค๊ฒŒ ๋‹จ์–ด ์ฐพ๊ธฐ[๐Ÿ”]

  • ๋‚ด ํด๋”์—์„œ ํ•˜์œ„ ํด๋”๊นŒ์ง€ ํŒŒ์ผ ์•ˆ์— ๋‚ด๊ฐ€ ์›ํ•˜๋Š” "println" ๋“ค์–ด๊ฐ„ ํŒŒ์ผ๋ช…๊ณผ ๋ช‡๋ฒˆ์งธ ์ค„์ธ์ง€ ๋‹ค ๋‚˜์˜ค๊ฒŒ ๋‹จ์–ด ์ฐพ๊ธฐ
find . | grep -winr -C 4 "println"

fdfind(fd) & ripgrep(rg) ์กฐํ•ฉ[๐Ÿ”]

fdfind main.rs
fd main.rs
  • ์ˆจ๊ธด ํŒŒ์ผ ์ฐพ๊ธฐ
fdfind -H ".DS_Store"

https://github.com/sharkdp/fd/blob/master/doc/screencast.svg

  • .DS_StoreํŒŒ์ผ ์ฐพ์•„์„œ ์ง€์šฐ๊ธฐ
fd -H '^\.DS_Store$' -tf -X rm

rg -i main

Disk (WindowsOS) ํŒŒํ‹ฐ์…˜ ์ด๊ฒŒ ์ตœ๊ณ  ใ…Ž

  • cmd

๊ด€๋ฆฌ์ž ๊ถŒํ•œ ์‹คํ–‰์œผ๋กœ ๋„์Šค์ฐฝ์„ ์—ฌ์‹ญ์‹œ์š”

๋‹ค์Œ์— diskpart ๋ผ๋Š” ๋ช…๋ น์„ ๋‚ด๋ฆฝ๋‹ˆ๋‹ค.

list disk ๋ผ๋Š” ๋ช…๋ น์œผ๋กœ ์ปดํ“จํ„ฐ์— ๋ถ™์–ด ์žˆ๋Š” ํ•˜๋“œ ๋ฆฌ์ŠคํŠธ๋ฅผ ํ™•์ธ(๋ฒˆํ˜ธ)ํ•ฉ๋‹ˆ๋‹ค.

select disk ๋ฒˆํ˜ธ (์ง€์šฐ๊ณ ์ž ํ•˜๋Š” ๋””์Šคํฌ ๋ฒˆํ˜ธ) ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

clean

detail disk

exit

grub๊ด€๋ จ

https://superuser.com/questions/158255/what-is-hd0-and-sda-sdb-in-linux


Nvidia CUDA Install

https://developer.nvidia.com/cuda-downloads

๋”ฅ๋Ÿฌ๋‹์„ ์œ„ํ•œ NVIDIA-Driver ์„ค์น˜ 2ํŽธ - Quick Guides https://youtu.be/xCeB5hQnDF0

nvidia-smi

Thu Jul 27 08:17:28 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.199.02   Driver Version: 470.199.02   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
|  0%   32C    P8    18W / 220W |    176MiB /  7973MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1214      G   /usr/lib/xorg/Xorg                 64MiB |
|    0   N/A  N/A      1518      G   /usr/bin/gnome-shell              110MiB |
+-----------------------------------------------------------------------------+

GPU ์ƒํƒœ ์‹ค์‹œ๊ฐ„ ํ™•์ธํ•˜๊ธฐ(gpustat & watch)

  • gpustat
gpustat -i
  • watch -d -n 0.5 nvidia-smi
watch -d -n 0.5 nvidia-smi

์ถœ์ฒ˜ : https://wscode.tistory.com/116



Rocky 9



Rocky 9 Linux [๐Ÿ”]

Rocky Linux 9 ~~~~~~

  • apt ๋น„์Šท
dnf install 

๋‚ด๊ฐ€ ๋งŒ๋“  Shell check ํ•˜๊ธฐ[๐Ÿ”]

https://www.shellcheck.net/

version check[๐Ÿ”]

cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
..
..
..
./neofetch

RockyLinux 9 ๋ช…๋ น์–ด ์ •๋ฆฌ[๐Ÿ”]

https://docs.rockylinux.org/books/admin_guide/03-commands/




Screen ๋ช…๋ น์–ด ์ •๋ฆฌ ~~~~~~~[๐Ÿ”]

// Ctrl + a
์ปค๋ฉ˜ํŠธ ํ• ๋•Œ tmux ์ฒ˜๋Ÿผ
 ๋ˆŒ๋Ÿฌ์ฃผ๊ณ  ๋‹ค์Œ  ๋ช…๋ น ์น˜๋ฉด ๋œ๋‹ค
 
 
 // ๋„์›€๋ง
 Ctrl + a   ?
 
 
 //์ฐฝ ์ƒˆ๋กœ ๋งŒ๋“ค๊ธฐ
 Ctrl + a    c
 
 
  //์ฐฝ ์ƒˆ๋กœ ๋งŒ๋“  listํ™•์ธ
 Ctrl + a     โ€œ
 
 
 
  //์ฐฝ ์ „ํ™˜ ๋งŒ๋“  ์ฐฝ ์ „ํ™˜
 Ctrl + a     0
 0
 1
 2
 
 
 
  //์ฐฝ ์ƒˆ๋กœ ๋งŒ๋“  listํ™•์ธ
 Ctrl + a     โ€œ 
 ์ด๊ฑธ๋กœ ๋งŒ๋“  bash ํ™”๋ฉด ํ™•์ธ ํ•˜๋ฉด ๋œ๋‹ค
 
 
 
 
  //์ฐฝ ์ฐฝbufer Kill ํ™•์ธ
 Ctrl + a     K
  • ๋‚˜๋ˆˆ ์ฐฝ ์ „ํ™˜
// ์ฐฝ sp๋กœ ๋‚˜๋ˆ„๊ธฐ ์ขŒ์šฐ. ํŒŒ์ดํ”„ ํ™œ์šฉ
Ctrl + a      |

or

Ctrl + a      :split -v




// โค๏ธ๋‚˜๋ˆˆ๊ฑฐ ์ฐฝ ์ „ํ™˜โค๏ธ tap
Ctrl + a     tap




// ์ƒํ•˜ vs.  (๋Œ€๋ฌธ์žS)
Ctrl + a     S

or

Ctrl + a   :split


// ๋‚˜๋ˆˆ ์ฐฝ ์—†์• ๊ธฐ
Ctrl + a  :remove
or
Ctrl + a , x 

https://economiceco.tistory.com/m/16169

https://superuser.com/questions/243459/unix-how-to-unsplit-in-screen


[Linux] tmux ์‚ฌ์šฉ๋ฒ• ~~~~~~~~~[๐Ÿ”]

  • tmux ์„ธํŒ…

  • tmux ๊ตฌ์„ฑ ์š”์†Œ

    • session: ์—ฌ๋Ÿฌ ์œˆ๋„์šฐ๋กœ ๊ตฌ์„ฑ
    • window: ํ„ฐ๋ฏธ๋„ ํ™”๋ฉด, ์„ธ์…˜ ๋‚ด์—์„œ ํƒญ์ฒ˜๋Ÿผ ์‚ฌ์šฉ ๊ฐ€๋Šฅ
    • pane: ํ•˜๋‚˜์˜ ์œˆ๋„์šฐ ๋‚ด์—์„œ์˜ ํ™”๋ฉด ๋ถ„ํ• 
  • session ๊ด€๋ จ ๋ช…๋ น์–ด

# ์ƒˆ๋กœ์šด ์„ธ์…˜ ์ƒ์„ฑ
tmux new -s (session_name)

# ์„ธ์…˜ ๋งŒ๋“ค๋ฉด์„œ ์œˆ๋„์šฐ๋ž‘ ๊ฐ™์ด ์ƒ์„ฑ
tmux new -s (session_name) -n (window_name)

# ์„ธ์…˜ ์ข…๋ฃŒ
exit

# ์„ธ์…˜ ๋ชฉ๋ก
tmux ls

# ์„ธ์…˜ ๋‹ค์‹œ ์‹œ์ž‘ํ•˜๊ธฐ(๋‹ค์‹œ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ)
tmux attach -t session_number

# ์„ธ์…˜ ์ค‘๋‹จํ•˜๊ธฐ
(ctrl + b) d

# ์Šคํฌ๋กคํ•˜๊ธฐ
ctrl + b + [

# ํŠน์ • ์„ธ์…˜ ๊ฐ•์ œ ์ข…๋ฃŒ
tmux kill-session -t session_number

์œˆ๋„์šฐ ๊ด€๋ จ ๋ช…๋ น์–ด

# ์ƒˆ ์œˆ๋„์šฐ ์ƒ์„ฑ
(ctrl + b) c

# ์ƒˆ ์œˆ๋„์šฐ ์ด๋™
(ctrl + b) b (์ˆซ์ž)

ํ‹€ ๊ด€๋ จ ๋ช…๋ น์–ด

# ํ‹€ ๋‚˜๋ˆ„๊ธฐ
(ctrl + b) % #์ขŒ์šฐ๋กœ ๋‚˜๋ˆ„๊ธฐ
(ctrl + b) " #์œ„์•„๋ž˜๋กœ ๋‚˜๋ˆ„๊ธฐ

# ํ‹€๋ผ๋ฆฌ ์ด๋™ํ•˜๊ธฐ
(ctrl + b) ๋ฐฉํ–ฅํ‚ค
(ctrl + b) q
(ctrl + b) o #์ˆœ์„œ๋Œ€๋กœ ์ด๋™

# ํ‹€ ์‚ญ์ œ
(ctrl + d)

# ํ‹€ ์‚ฌ์ด์ฆˆ ์กฐ์ •
(ctrl + b) : resize_pane -L 10 #L,R,U,D ์ž…๋ ฅํ•˜๋ฉด ์ƒํ•˜์ขŒ์šฐ๋กœ ์กฐ์ ˆ๋จ
(ctrl + b) (alt) ๋ฐฉํ–ฅํ‚ค

# ๋‹จ์ถ•ํ‚ค ๋ชฉ๋ก
(ctrl + b) ?

https://velog.io/@ur-luella/tmux-%EC%82%AC%EC%9A%A9%EB%B2%95


ubuntu Linux ~~~~~~~~~~~~[๐Ÿ”]

Nvidia ์„ค์น˜๋ฅผ ์œ„ํ•ด Exit The X Server[๐Ÿ”]

https://www.systranbox.com/how-to-exit-the-x-server-on-a-linux-machine/

sudo service lightdm stop

lsof ํฌํŠธ ์ฃฝ์ด๊ธฐ[๐Ÿ”]

  • 8000 ํฌํŠธport ๊ฒ€์ƒ‰
lsof -i :7999

  • ์‚ฌ์šฉ์ค‘์ธ ํฌํŠธ ์ฃฝ์ด๊ธฐ
kill -9 pid์“ฐ๋ฉด ๋จ

์‹คํ–‰์ค‘์ธ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์‚ฌ์šฉ์ค‘์ธ port๋ฒˆํ˜ธ ์•Œ์•„๋‚ด๊ธฐ

netstat -ntlp

GRUB(GRand Unified Bootloader๊ฒ€์ƒ‰ํ•˜๋‹ค๊ฐ€ ์•Œ๊ฒŒ ๋จ. [๐Ÿ”]

  • ๋ฆฌ๋ˆ…์Šค ์‹œ์Šคํ…œ ๋ถ€ํŒ… ํ”„๋กœ์„ธ์Šค(๋ฆฌ๋ˆ…์Šค ๋ถ€ํŒ…๊ณผ์ •) ๏ปฟ -https://yonlog.tistory.com/59

Linux sed ์‚ฌ์šฉ๋ฒ•[๐Ÿ”]

https://www.lesstif.com/lpt/linux-sed-6979751.html

macOS




ip ํ™•์ธ[๐Ÿ”]

// To run the alternative to the ifconfig utility, type in this command:

ip a

https://www.makeuseof.com/fix-ifconfig-command-not-found-error-linux/


๋‹ค๋ฅธ ์‚ฌ๋žŒ์˜ ๋ฆฌ๋ˆ…์ŠคCommand ์ •๋ฆฌ ์ž๋ฃŒ[๐Ÿ”]

Linux Version ์ฒดํฌlinux

lsb_release -a

์œˆ๋„์šฐ ๊ด€๋ จ & ๋ฆฌ๋ˆ…์Šค ๊ฒน์น˜๋Š” ๋‚ด์šฉ shell[๐Ÿ”]

https://github.com/YoungHaKim7/Shell_Script

sudo apt ๋งŽ์ด ์“ฐ๋Š”๊ฑฐ ์ •๋ฆฌ[๐Ÿ”]

  • ์„ค์น˜ ๊ฐ€๋Šฅํ•œ ํŒจํ‚ค์ง€ ๋ฆฌ์ŠคํŠธ๋ฅผ ์ตœ์‹ ํ™”
sudo apt update
  • ํ˜„์žฌ ๋ฆฌ์ŠคํŠธ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
sudo apt list
  • ํ˜„์žฌ ์„ค์น˜๋œ ๋ฆฌ์ŠคํŠธ ์ค‘์—์„œ ์—…๊ทธ๋ ˆ์ด๋“œ๊ฐ€ ํ•„์š”ํ•œ ๋ชฉ๋ก
sudo apt list --upgradable
  • ์„ค์น˜๊ฐ€ ํ•„์š”ํ•œ ๋ฆฌ์ŠคํŠธ๋ฅผ ํ™•์ธํ–ˆ๋‹ค๋ฉด upgrade๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์‹ค์ œ ์—…๋ฐ์ดํŠธ๋ฅผ ๊ฐ€๋Šฅ
sudo apt upgrade

https://tttap.tistory.com/130

  • Use 'sudo apt autoremove' to remove them (The following packages were automatically installed and are no longer required: libfwupdplugin1 libxmlb1) ๋ถˆํ•„์š”ํ•œ๊ฒŒ ์žˆ๋‹ค๊ณ  ์ฒดํฌ๋œ๊ฑฐ ์ž๋™์œผ๋กœ ์‚ญ์ œํ•˜๊ธฐ
sudo apt autoremove

apt search & install & remove[๐Ÿ”]

sudo apt search elastic

sudo apt install elastic


https://codingdog.tistory.com/entry/%EC%9A%B0%EB%B6%84%ED%88%AC-apt-search-%EB%AA%85%EB%A0%B9%EC%96%B4%EB%A5%BC-%EC%9D%B4%EC%9A%A9%ED%95%B4%EC%84%9C-%ED%8C%A8%ED%82%A4%EC%A7%80%EB%A5%BC-%EC%B0%BE%EC%95%84%EB%B4%85%EC%8B%9C%EB%8B%A4

remove & purge ์ฐจ์ด[๐Ÿ”]

$ sudo apt remove <ํŒจํ‚ค์ง€๋ช…>

ํŒจํ‚ค์ง€๋ฅผ ์‚ญ์ œํ•œ๋‹ค. ํ•˜์ง€๋งŒ ์„ค์ •ํŒŒ์ผ์€ ๋‚จ๊ฒจ๋‘”๋‹ค.

$ sudo apt purge <ํŒจํ‚ค์ง€๋ช…>

ํŒจํ‚ค์ง€๋ฅผ ์‚ญ์ œํ•œ๋‹ค. ์„ค์ •ํŒŒ์ผ๋„ ํ•จ๊ป˜ ์‚ญ์ œํ•œ๋‹ค.

https://gintrie.tistory.com/23

Command Line Crash Course | freeCodeCamp.org[๐Ÿ”]

๊ฒฐ๊ตญ์€ Linux command๋ฅผ ์™ธ์›Œ์•ผํ•จ[๐Ÿ”]

Cd Ls (dos์—์„œ dir์ด๋ž‘ ๋˜‘๊ฐ™์Œ)

WindowsOS ์‹คํ–‰ ์ฐฝ์—์„œ (๋‹จ์ถ•ํ‚ค win+R)[๐Ÿ”]

//์œˆ๋„์šฐ ํ„ฐ๋ฏธ๋„
wt.exe
windowsterminal.exe


// ํŒŒ์›Œ์…€
powershell.exe
pwsh.exe

Linux ๋ช…๋ น์–ด๋Š” ๋ชจ๋‘ ์†Œ๋ฌธ์ž[๐Ÿ”]

whoami

  • ํ˜„์žฌ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” ๋‚˜์˜ ๊ณ„์ • ์ •๋ณด ํ™•์ธํ•˜๊ธฐ
whoami
  • ํ˜„์žฌ ์›Œํ‚น ๋””๋ ‰ํ† ๋ฆฌ ํ‘œ์‹œํ•ด์คŒthe pwd command will tell you exactly what the current working directory is.
pwd

cd ์ž‘์—…๋””๋ ‰ํ† ๋ฆฌ ๋ณ€๊ฒฝ[๐Ÿ”]

  • You can change the working directory using the cd command, an abbreviation for โ€˜change directoryโ€™. Try typing the following:
//root๋กœ ๊ฐ€๊ธฐ
cd

cd ..

// ์ด๋ ‡๊ฒŒ ๋ถ™ํ˜€๋„๋จ
cd ../../..
  • cd ..
ํด๋”์—์„œ ๋‚˜๊ฐ€๊ธฐ
Test/123 > cd ..
Test

cd ../../


2๋ฒˆ ์“ฐ๋ฉด 2๊ฐœ๋ฅผ ์—ฐ์†์œผ๋กœ ๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋‹ค.
cd ..
cd ..

์ด๋ ‡๊ฒŒ ํ–ˆ๋Š”๋ฐ ใ…‹ใ…‹ใ…‹

cd ../../

์ด๋Ÿฐ ์ข‹์€ ๋ฐฉ๋ฒ•์ด!!

*

๋ฆฌ๋ˆ…์Šค๋Š” ์šฐ๋ฆฌ๋‚˜๋ผ ๋ˆ ๋ชจ์–‘์ด ์•„๋‹ˆ๋ผ / forward ์ž„. - ์ด๊ฑฐ ๊ณจํƒ• ๋งŽ์ด ๋จน์—ˆ๋Š”๋ฐ ใ…‹ใ…‹ Note that the directory separator is a forward slash (โ€/โ€), not the backslash that you may be used to from Windows or DOS systems

  • ํŒŒ์ผ ์ง€์šฐ๊ธฐ
rm
rm -rf ํด๋”๋ช…
ํด๋” ์ง€์šธ๋•Œ๋Š” -rf ๋ถ™ํ˜€์•ผํ•จ

rm -r ํด๋”๋ช… ํด๋”์— ํŒŒ์ผ์ด ์žˆ์–ด๋„ ๊ฐ•์ œ๋กœ ๋‹ค ์ง€์›Œ์คŒ ์ตœ๊ณ !!!
  • ํŒŒ์ผ ๋งŒ๋“ค๊ธฐ
touch test.txt

touch test.txt

์œˆ๋„์—์„œ touch๊ฐ™์€ ๊ธฐ๋Šฅ ๊ตฌํ˜„ํ•˜๊ธฐ[๐Ÿ”]

  • ๋‚˜์˜ shell์ฐธ์กฐ

์œˆ๋„์šฐ์—์„œ๋Š”WindowsOS ์Šคํƒ€์ผ

$ echo $null >> hello.c

hello.c ํŒŒ์ผ ๋งŒ๋“ค๊ธฐ https://github.com/YoungHaKim7/Ada_Lang

mkdirํด๋” ๋งŒ๋“ค๊ธฐ[๐Ÿ”]

mkdir test testํด๋” ๋งŒ๋“ค์–ด์ง rmdir test testํด๋” ์ง€์›Œ์ง

rmdirํด๋” ์ง€์šฐ๊ธฐ[๐Ÿ”]

// ๋งŽ์ด ์•ˆ ์จ๋ด์„œ ์ž˜ ๋ชจ๋ฅด๊ฒ ์Œ
rmdir

= mv ํŒŒ์ผ๋ช… ๋ฐ”๊พธ๊ธฐ

move test.js new_test.js
ํ•œ์นธ ๋„์šฐ๊ธฐ ํ•ด์•ผ ๋ช…๋ น์–ด ๋จน์ž„
move test.js test/new_test.js


// mv๋ฅผ ๋งŽ์ด ์”€
mv test.js new_test.js

// ์—ฌ๋Ÿฌ๊ฐœ ํŒŒ์ผ์„ ๋‹ค๋ฅธ ํด๋”๋กœ ์˜ฎ๊ธฐ๋Š” ๋ฐฉ๋ฒ• ์ญ‰ ๋‚˜์—ดํ•˜๊ณ  ๋งจ ๋งˆ์ง€๋ง‰์— ํƒ€์ผ“์ด ๋˜๋Š” ํด๋”๋Š” ์ง€์ •ํ•ด์ฃผ๋ฉด ์˜ฎ๊ฒจ์ง„๋‹ค. ๊ตฟ!
mv <file> <file> <file> <file> <Target:Folder>
move test.js test/new_test.js mv test.js test/new_test.js
test_main % mv ../test/src/test01 src test_main % cp ../test/src/main.rs src test_main ํด๋”๋กœ ํด๋”์™€ ํŒŒ์ผ์„ ๋ฐ๋ฆฌ๊ณ  ์˜ค๊ธฐ test_mainํด๋”์—์„œ ๋‹ค๋ฅธ ๋””๋ ‰ํ† ๋ฆฌ์— ์žˆ๋Š” ํŒŒ์ผ์ด ๊ฐ€์ง€๊ณ  ์˜ค๊ธฐ ใ…Žใ…Ž ์ตœ๊ณ !! ํ†ต์งธ๋กœ ๋‹ค ๊ฐ€์ง€๊ณ  ์˜ด. ์ด๋™๊ณผ ์นดํ”ผ๋ฅผ ํ•˜์˜€์Œ srcํด๋”๋กœ move์™€ copy๋ฅผ ํ•˜์˜€์Œ.

cp ํด๋” ๊ฐ•์ œ๋กœ ๋งŒ๋“ค๊ธฐ ์ข‹๋„ค ใ…Žใ…Žโค๏ธ - https://economiceco.tistory.com/m/15199

clearํ™”๋ฉด ๊นจ๋—์ด ํ•˜๊ธฐ[๐Ÿ”]

cd g
๋””๋ ‰ํ† ๋ฆฌ๋ช… ์ฒซ ๊ธ€์งœ๋งŒ ๋ˆ„๋ฅด๊ณ  ํƒญ ๋ˆ„๋ฅด๋ฉด ํด๋”๋ช… ์ž๋™ ์™„์„ฑ๋จ ๋Œ€๋ฐ• ํŽธํ•จ
ls
Dos์˜ dir

ls -l

ls ls -f
ls -l ls -a ls -R ls ..
ls 

๋ช…๋ น์–ด ํ•œ๊ธ€๋กœ ์ž์„ธํžˆ ๋ณด๊ธฐ http://www.ktword.co.kr/test/view/view.php?m_temp1=6054

root๊ถŒํ•œ์œผ๋กœ ํŒŒ์ผ ์„ค์น˜ ํ•  ๋•Œ ์”€ ์œˆ๋„์šฐ์˜ Admin๊ณ„์ • ๊ถŒํ•œ์œผ๋กœ ์ดํ•ด!!!

๋ฆฌ๋ˆ…์Šค ์šฉ๋Ÿ‰ํ™•์ธ[๐Ÿ”]

df -h

https://velog.io/@devmin/%EB%A6%AC%EB%88%85%EC%8A%A4%EC%97%90%EC%84%9C-%EB%8B%A4%EB%A5%B8-%EB%93%9C%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%A1%9C-%EA%B2%BD%EB%A1%9C-%EC%9D%B4%EB%8F%99%ED%95%98%EA%B8%B0

mv ls์˜ต์…˜ ๋ช…๋ น์–ด ์ž˜ ์ •๋ฆฌ๋จ.[๐Ÿ”]

https://shapeshed.com/unix-mv/#:~:text=What%20is%20the%20mv%20command,are%20new%20than%20the%20destination.

Linux and Unix mv command tutorial with examples | George Ornbo

Last updated Wednesday, Jan 8, 2020 Linux and Unix mv command tutorial with examples Tutorial on using mv, a UNIX and Linux command to move or rename files. Examples of moving a file, moving multiple files, moving a directory, prompting before overwriting

shapeshed.com

ํ„ฐ๋ฏธ๋„์—์„œ ๋ชจ๋“  ํ”„๋กœ์„ธ์Šค kill[๐Ÿ”]

  • ์šฐ์„  ํ„ฐ๋ฏธ๋„์„ ์—ด๊ณ  ๋ชจ๋“  ํ”„๋กœ์„ธ์Šค๋ฅผ kill ํ•ด์ค๋‹ˆ๋‹ค.
$ sudo killall apt apt-get

symbol link๋งŒ๋“ค๊ธฐ ๋‹จ์ถ•์•„์ด์ฝ˜ ๋งŒ๋“ค์–ด์„œ ํŽธํ•˜๊ฒŒ ์ด๋™[๐Ÿ”]

์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋Š” ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ๋งŒ๋“ค์ˆ˜ ์žˆ๋‹ค.

ln -s TARGET(์›๋ณธ) LINK_NAME(๋งํฌ์ด๋ฆ„)

์ถœ์ฒ˜ : https://hong00.tistory.com/80

https://leevisual.tistory.com/75

  • 2 ๊นŠ์ด ๊นŒ์ง€๋งŒ ๋“ค์–ด๊ฐ„๋‹ค. ๊ตฟ
tree -L 2
์˜ต์…˜
์˜๋ฏธ
๊ธฐํƒ€
-d
๋””๋ ‰ํ† ๋ฆฌ๋งŒ ๋ฆฌ์ŠคํŠธ
1-1๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-a
๋ชจ๋“ ํŒŒ์ผ ๋ฆฌ์ŠคํŠธ
1-2๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-f
ํ‘œ์‹œ๋˜๋Š” ํŒŒ์ผ์˜ ์ „์ฒด๊ฒฝ๋กœ ํ‘œ์‹œ
1-3๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-L
๋””๋ ‰ํ† ๋ฆฌ depth ์„ค์ •
1-4๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-P
ย 
1-5๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-I
ย 
1-6๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
--prune
ํ……๋นˆ ๋””๋ ‰ํ† ๋ฆฌ ๋ฆฌ์ŠคํŠธ ์•ˆํ•จ.
1-7๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-p
ํŒŒ์ผ์˜ ํƒ€์ž…๋ฐ ํผ๋ฏธ์…˜ ์ถœ๋ ฅ
1-8๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-u
์‚ฌ์šฉ์ž(username) ์ถœ๋ ฅ
1-9๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-h
ํŒŒ์ผ์˜ ์‚ฌ์ด์ฆˆ ์ถœ๋ ฅ (human readable)
1-10๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-s
ํŒŒ์ผ์˜ ์‚ฌ์ด์ฆˆ ์ถœ๋ ฅ
1-11๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
--du
๋””๋ ‰ํ† ๋ฆฌ์— ๋Œ€ํ•œ ์‹ค์ œ ํฌ๊ธฐ ์ถœ๋ ฅ
1-12๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ
-o
์ถœ๋ ฅ์„ ํŒŒ์ผ๋กœ ์ „์†ก
1-13๋ฒˆ ํ•ญ๋ชฉ ์ฐธ์กฐ

[Linux] scp ๋ช…๋ น์–ด๋กœ (๋กœ์ปฌโ†”์„œ๋ฒ„) ํŒŒ์ผ ์ „์†ก| by Heejin Do[๐Ÿ”]

์™ธ๊ตญ ์‚ฌ๋žŒ์˜ ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด ์ •๋ฆฌlinuxjs[๐Ÿ”]

https://github.com/ethanflower1903/linux-command

๊ด€๋ จ eBook์ฑ… ์œ ๋ฃŒ$[๐Ÿ”]

eBook)๋ฆฌ๋ˆ…์Šค ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๋ช…๋ น์–ด ์‚ฌ์ „ : ์šฐ๋ถ„ํˆฌ, ๋ฐ๋น„์•ˆ, CentOS, ํŽ˜๋„๋ผ ๋Œ€์‘ [ PDF ] - https://economiceco.tistory.com/m/11390

echo ๋กœ unicode ์ถœ๋ ฅํ•˜๊ธฐ[๐Ÿ”]

% echo -e '\u2620'     # \u takes four hexadecimal digits
โ˜ 
% echo -e '\U0001f602' # \U takes eight hexadecimal digits
๐Ÿ˜‚

catํ™œ์šฉ๋ฒ•[๐Ÿ”]

# ํŒŒ์ผ ๋ฏธ๋ฆฌ ๋ณด๊ธฐ
cat main.rs


# vim์—๋””ํ„ฐ๋„ ๋ชป ์“ฐ๋Š” ํ™˜๊ฒฝํ•ด์„œ ๊ธ‰ํ•˜๊ฒŒ ์“ฐ๋Š” ๋ฒ• ์ข‹๋„ค
cat > main.c
# ๋‚ด๊ฐ€ ๋„ฃ๊ณ  ์‹ถ์€ ์ฝ”๋“œ ๋„ฃ๊ณ 
# Ctrl + D ํ•˜๋ฉด ์ €์žฅ๋จ. ๋Œ€๋ฐ•
  • ์ฝ˜์†”์—์„œ eof ์ž…๋ ฅํ•˜๊ณ  ์‹ถ์œผ์‹œ๋ฉด ctrl d ๋ˆ„๋ฅด์‹œ๊ณ  ์—”ํ„ฐํ•˜๋ฉด๋จ.(EOF๊ฐ€ Ctrl+D์ธ๊ฐ€๋ณด๋‹ค ๊ตฟ)

curl์‚ฌ์šฉ๋ฒ•[๐Ÿ”]

  • curl ์ด๋ž€? https://curl.se/docs/manpage.html

    • curl์€ Client Url ์ด๋ž€ ์˜๋ฏธ๋กœ ํด๋ผ์ด์–ธํŠธ์—์„œ url์„ ์‚ฌ์šฉํ•ด์„œ ์„œ๋ฒ„์™€ ๋ฐ์ดํ„ฐ๋ฅผ ์†ก์ˆ˜์‹ ํ•˜๋Š” ๋ช…๋ น์–ด ํˆด์ด๋‹ค.
    • Linux, MacOS, Window ๋“ฑ ๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ์—์„œ HTTP, HTTPS, SMTP, TELNET, FTP, LDAP ๋“ฑ ๋‹ค์–‘ํ•œ ํ”„๋กœํ† ์ฝœ์„ ์ง€์›ํ•˜์—ฌ ํ†ต์‹  ํ™˜๊ฒฝ์—์„œ ์ž์ฃผ ์“ฐ์ธ๋‹ค.
  • https://sasca37.tistory.com/279

  • -H -X ๋’ค์— ์ด๋Ÿฐ ์˜ต์…˜๋“ค ๋ถ™ํžˆ๋ฉด ๋œ๋‹ค.

$ curl -h
Usage: curl [options...] <url>
 -d, --data <data>          HTTP POST data
 -f, --fail                 Fail fast with no output on HTTP errors
 -h, --help <category>      Get help for commands
 -i, --include              Include protocol response headers in the output
 -o, --output <file>        Write to file instead of stdout
 -O, --remote-name          Write output to a file named as the remote file
 -s, --silent               Silent mode
 -T, --upload-file <file>   Transfer local FILE to destination
 -u, --user <user:password> Server user and password
 -A, --user-agent <name>    Send User-Agent <name> to server
 -v, --verbose              Make the operation more talkative
 -V, --version              Show version number and quit

This is not the full help, this menu is stripped into categories.
Use "--help category" to get an overview of all categories.
For all options use the manual or "--help all".



$ curl --help category
Usage: curl [options...] <url>
 auth        Different types of authentication methods
 connection  Low level networking operations
 curl        The command line tool itself
 dns         General DNS options
 file        FILE protocol options
 ftp         FTP protocol options
 http        HTTP and HTTPS protocol options
 imap        IMAP protocol options
 misc        Options that don't fit into any other category
 output      Filesystem output
 pop3        POP3 protocol options
 post        HTTP Post specific options
 proxy       All options related to proxies
 scp         SCP protocol options
 sftp        SFTP protocol options
 smtp        SMTP protocol options
 ssh         SSH protocol options
 telnet      TELNET protocol options
 tftp        TFTP protocol options
 tls         All TLS/SSL related options
 upload      All options for uploads
 verbose     Options related to any kind of command line output of curl
  • ๋ฆฌ๋ˆ…์Šค ์™ธ๋ถ€ ์ ‘์† IP ํ™•์ธ (curl ifconfig.me)_๋‚ด ์•„์ดํ”ผ ์•Œ์•„๋‚ด๊ธฐ(curl ifconfig.me)
$ curl ifconfig.me
148.83.73.113 

GNU ๋ฐ”์ด๋„ˆ๋ฆฌ ์œ ํ‹ธ๋ฆฌํ‹ฐ|๐Ÿ”|

  • GNU Binutilsย ๋งฅ์˜ OS X๊ฑด,ย ๋ฆฌ๋ˆ…์Šค ๊ฑด, ๊ฐœ๋ฐœ์„ย ํ•˜๋‹ค ๋ณด๋ฉด ๋””๋ฒ„๊น… ํ•  ์ผ์ด ์ƒ๊ธฐ๊ฒŒ ๋งˆ๋ จ์ด๋‹ค. ๋””๋ฒ„๊น…์‹œ ์œ ์šฉํ•œ ๋„๊ตฌ์ค‘ ํ•˜๋‚˜๊ฐ€ย GNU ๋ฐ”์ด๋„ˆ๋ฆฌ ์œ ํ‹ธ๋ฆฌํ‹ฐ(GNUย Binutils)์ด๋‹ค.
    • GNU ๋ฐ”์ด๋„ˆ๋ฆฌ ์œ ํ‹ธ๋ฆฌํ‹ฐ๋Š” ์—ฌ๋Ÿฌ ์ข…๋ฅ˜์˜ ์˜ค๋ธŒ์ ํŠธ ํŒŒ์ผ ํ˜•์‹๋“ค์„ ์กฐ์ž‘ํ•˜๊ธฐ ์œ„ํ•œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋„๊ตฌ ๋ชจ์Œ์ธ๋ฐ,ย ์ด๋“ค์€ ์ผ๋ฐ˜์ ์œผ๋กœ GCC, make, GDB์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๊ฒŒ ๋œ๋‹ค.
as - ์–ด์…ˆ๋ธ”๋Ÿฌ
ld - ๋ง์ปค
addr2line - ์ฃผ์†Œ๋ฅผ ํŒŒ์ผ๊ณผ ์ค„๋กœ ๋ฐ”๊พผ๋‹ค.
ar - ์•„์นด์ด๋ธŒ(์••์ถ•) ํŒŒ์ผ์„ ๋งŒ๋“ค๊ณ , ์ˆ˜์ •ํ•˜๊ณ , ํ•ด์ œํ•œ๋‹ค.
c++filt - ๋งน๊ธ€๋ง๋œ C++ ์‹ฌ๋ณผ๋“ค์„ ์›๋ž˜๋Œ€๋กœ ๋˜๋Œ๋ฆฐ๋‹ค.
nm - ์˜ค๋ธŒ์ ํŠธ ํŒŒ์ผ์˜ ์‹ฌ๋ณผ์„ ์ถœ๋ ฅํ•œ๋‹ค.
objcopy - ์˜ค๋ธŒ์ ํŠธ ํŒŒ์ผ์„ ๋ณต์‚ฌํ•œ๋‹ค.
objdump - ์˜ค๋ธŒ์ ํŠธ ํŒŒ์ผ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค.
ranlib - ์•„์นด์ด๋ธŒ(์••์ถ•)๋ฅผ ์œ„ํ•œ ์ƒ‰์ธ์„ ๋งŒ๋“ ๋‹ค.
readelf - ELF ํŒŒ์ผ์˜ ๋‚ด์šฉ์„ ์ถœ๋ ฅํ•œ๋‹ค.
size - ์ „์ฒด์™€ ๋ถ€๋ถ„์˜ ํฌ๊ธฐ๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค.
strings - ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ๋Š” ๋ฌธ์ž์—ด์„ ์ถœ๋ ฅํ•œ๋‹ค.
strip - ์˜ค๋ธŒ์ ํŠธ ํŒŒ์ผ๋กœ๋ถ€ํ„ฐ ์‹ฌ๋ณผ์„ ์ œ๊ฑฐํ•œ๋‹ค.
gprof - ํ”„๋กœํŒŒ์ผ๋Ÿฌ

์ถœ์ฒ˜: https://techlog.gurucat.net/263 [์ œ์ž„์Šค๋”˜๋”˜์˜ Tech & Life:ํ‹ฐ์Šคํ† ๋ฆฌ]

readelf -r app

Relocation section '.rel.dyn' at offset 0x5ec contains 2 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
08049d58  00001706 R_386_GLOB_DAT    00000000   __gmon_start__
08049d60  00000305 R_386_COPY        08049d60   _ZSt4cout

Relocation section '.rel.plt' at offset 0x5fc contains 13 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
08049d24  00000107 R_386_JUMP_SLOT   0804868c   print
08049d28  00000207 R_386_JUMP_SLOT   0804869c   _ZNSt8ios_base4InitC1E
08049d2c  00000507 R_386_JUMP_SLOT   080486ac   _ZStlsISt11char_traits
08049d30  00000607 R_386_JUMP_SLOT   080486bc   _ZNSolsEPFRSoS_E
08049d34  00000707 R_386_JUMP_SLOT   08048664   _init
08049d38  00000807 R_386_JUMP_SLOT   080486dc   sleep
08049d3c  00000907 R_386_JUMP_SLOT   080486ec   _ZNKSsixEj
08049d40  00000b07 R_386_JUMP_SLOT   080486fc   _ZNKSs4sizeEv
08049d44  00000c07 R_386_JUMP_SLOT   0804870c   __libc_start_main
08049d48  00000d07 R_386_JUMP_SLOT   08048ae4   _fini
08049d4c  00001307 R_386_JUMP_SLOT   0804872c   _ZSt4endlIcSt11char_tr
08049d50  00001507 R_386_JUMP_SLOT   0804873c   __gxx_personality_v0
08049d54  00001607 R_386_JUMP_SLOT   0804874c   _ZNSt8ios_base4InitD1E

ํ„ฐ๋ฏธ๋„์—์„œ ์“ฐ๋Š” ๊ณ„์‚ฐ๊ธฐ(qalc)C++๋กœ ๋งŒ๋“ฌ|๐Ÿ”|

sqrt 4 = sqrt(4) = 4^(0.5) = 4^(1/2) = 2

sqrt(25; 16; 9; 4) = [5 4 3 2]

sqrt(32) = 4 ร— โˆš(2) (in exact mode)

cbrt(โˆ’27) = root(-27; 3) = โˆ’3 (real root)

(โˆ’27)^(1/3) โ‰ˆ 1.5 + 2.5980762i (principal root)

ln 25 = log(25; e) โ‰ˆ 3.2188758

log2(4)/log10(100) = log(4; 2)/log(100; 10) = 1

5! = 1 ร— 2 ร— 3 ร— 4 ร— 5 = 120

5\2 = 5//2 = trunc(5 / 2) = 2 (integer division)

5 mod 3 = mod(5; 3) = 2

52 to factors = 2^2 ร— 13

25/4 ร— 3/5 to fraction = 3 + 3/4

gcd(63; 27) = 9

sin(pi/2) โˆ’ cos(pi) = sin(90 deg) โˆ’ cos(180 deg) = 2

sum(x; 1; 5) = 1 + 2 + 3 + 4 + 5 = 15

sum(\i^2+sin(\i); 1; 5; \i) = 1^2 + sin(1) + 2^2 + sin(2) + ... โ‰ˆ 55.176162

product(x; 1; 5) = 1 ร— 2 ร— 3 ร— 4 ร— 5 = 120

var1:=5 (stores value 5 in variable var1) var1 ร— 2 = 10

5^2 #this is a comment = 25

sinh(0.5) where sinh()=cosh() = cosh(0.5) โ‰ˆ 1.1276260

plot(x^2; โˆ’5; 5) (plots the function y=x^2 from -5 to 5)
  • Units
5 dm3 to L = 5 dm^3 to L = 5 L

20 miles / 2h to km/h = 16.09344 km/h

1.74 to ft = 1.74 m to ft โ‰ˆ 5 ft + 8.5039370 in

1.74 m to -ft โ‰ˆ 5.7086614 ft

100 lbf ร— 60 mph to hp โ‰ˆ 16 hp

50 ฮฉ ร— 2 A = 100 V

50 ฮฉ ร— 2 A to base = 100 kgยทmยฒ/(sยณยทA)

10 N / 5 Pa = (10 N)/(5 Pa) = 2 mยฒ

5 m/s to s/m = 0.2 s/m

500 โ‚ฌ โˆ’ 20% to $ โ‰ˆ $451.04

500 megabit/s ร— 2 h to b?byte โ‰ˆ 419.09516 gibibytes
  • Physical constants
k_e / G ร— a_0 = (coulombs_constant / newtonian_constant) ร— bohr_radius โ‰ˆ 7.126e9 kgยทHยทm^โˆ’1

โ„Ž / (ฮป_C ร— c) = planck โˆ• (compton_wavelength ร— speed_of_light) โ‰ˆ 9.1093837e-31 kg

5 ns ร— rydberg to c โ‰ˆ 6.0793194E-8c

atom(Hg; weight) + atom(C; weight) ร— 4 to g โ‰ˆ 4.129e-22 g

(G ร— planet(earth; mass) ร— planet(mars; mass))/(54.6e6 km)^2 โ‰ˆ 8.58e16 N (gravitational attraction between earth and mars)
  • Uncertainty and interval arithmetic
"ยฑ" can be replaced with "+/-"; result with interval arithmetic activated is shown in parenthesis

sin(5ยฑ0.2)^2/2ยฑ0.3 โ‰ˆ 0.460ยฑ0.088 (0.46ยฑ0.12)

(2ยฑ0.02 J)/(523ยฑ5 W) โ‰ˆ 3.824ยฑ0.053 ms (3.825ยฑ0.075 ms)

interval(โˆ’2; 5)^2 โ‰ˆ interval(โˆ’8.2500000; 12.750000) (interval(0; 25))
  • Algebra
(5x^2 + 2)/(x โˆ’ 3) = 5x + 15 + 47/(x โˆ’ 3)

(\a + \b)(\a โˆ’ \b) = ("a" + "b")("a" โˆ’ "b") = 'a'^2 โˆ’ 'b'^2

(x + 2)(x โˆ’ 3)^3 = x^4 โˆ’ 7x^3 + 9x^2 + 27x โˆ’ 54

factorize x^4 โˆ’ 7x^3 + 9x^2 + 27x โˆ’ 54 = x^4 โˆ’ 7x^3 + 9x^2 + 27x โˆ’ 54 to factors = (x + 2)(x โˆ’ 3)^3

cos(x)+3y^2 where x=pi and y=2 = 11

gcd(25x; 5x^2) = 5x

1/(x^2+2xโˆ’3) to partial fraction = 1/(4x โˆ’ 4) โˆ’ 1/(4x + 12)

x+x^2+4 = 16 = (x = 3 or x = โˆ’4)

x^2/(5 m) โˆ’ hypot(x; 4 m) = 2 m where x > 0 = (x โ‰ˆ 7.1340411 m)

cylinder(20cm; x) = 20L (calculates the height of a 20 L cylinder with radius of 20 cm) = (x = (1 / (2ฯ€)) m) = (x โ‰ˆ 16 cm)

asin(sqrt(x)) = 0.2 = (x = sin(0.2)^2) = (x โ‰ˆ 0.039469503)

x^2 > 25x = (x > 25 or x < 0)

solve(x = y+ln(y); y) = lambertw(e^x)

multisolve([5x=2y+32, y=2z, z=2x]; [x, y, z]) = [โˆ’32/3 โˆ’128/3 โˆ’64/3]

dsolve(diff(y; x) โˆ’ 2y = 4x; 5) = 6e^(2x) โˆ’ 2x โˆ’ 1

  • Calculus
diff(6x^2) = 12x

diff(sinh(x^2)/(5x) + 3xy/sqrt(x)) = (2/5) ร— cosh(x^2) โˆ’ sinh(x^2)/(5x^2) + (3y)/(2 ร— โˆš(x))

integrate(6x^2) = 2x^3 + C

integrate(6x^2; 1; 5) = 248

integrate(sinh(x^2)/(5x) + 3xy/sqrt(x)) = 2x ร— โˆš(x) ร— y + Shi(x^2) / 10 + C

integrate(sinh(x^2)/(5x) + 3xy/sqrt(x); 1; 2) โ‰ˆ 3.6568542y + 0.87600760

limit(ln(1 + 4x)/(3^x โˆ’ 1); 0) = 4 / ln(3)
  • Matrices and vectors
[1, 2, 3; 4, 5, 6] = ((1; 2; 3); (4; 5; 6)) = [1 2 3; 4 5 6] (2ร—3 matrix)

1...5 = (1:5) = (1:1:5) = [1 2 3 4 5]

(1; 2; 3) ร— 2 โˆ’ 2 = [(1 ร— 2 โˆ’ 2), (2 ร— 2 โˆ’ 2), (3 ร— 2 โˆ’ 2)] = [0 2 4]

[1 2 3].[4 5 6] = dot([1 2 3]; [4 5 6]) = 32 (dot product)

cross([1 2 3]; [4 5 6]) = [โˆ’3 6 โˆ’3] (cross product)

[1 2 3; 4 5 6].ร—[7 8 9; 10 11 12] = hadamard([1 2 3; 4 5 6]; [7 8 9; 10 11 12]) = [7 16 27; 40 55 72] (hadamard product)

[1 2 3; 4 5 6] ร— [7 8; 9 10; 11 12] = [58 64; 139 154] (matrix multiplication)

[1 2; 3 4]^-1 = inverse([1 2; 3 4]) = [โˆ’2 1; 1.5 โˆ’0.5]
  • Statistics
mean(5; 6; 4; 2; 3; 7) = 4.5

stdev(5; 6; 4; 2; 3; 7) โ‰ˆ 1.87

quartile([5 6 4 2 3 7]; 1) = percentile((5; 6; 4; 2; 3; 7); 25) โ‰ˆ 2.9166667

normdist(7; 5) โ‰ˆ 0.053990967

spearman(column(load(test.csv); 1); column(load(test.csv); 2)) โ‰ˆ โˆ’0.33737388 (depends on the data in the CSV file)
  • Time and date
10:31 + 8:30 to time = 19:01

10h 31min + 8h 30min to time = 19:01

now to utc = "2020-07-10T07:50:40Z"

"2020-07-10T07:50CET" to utc+8 = "2020-07-10T14:50:00+08:00"

"2020-05-20" + 523d = addDays(2020-05-20; 523) = "2021-10-25"

today โˆ’ 5 days = "2020-07-05"

"2020-10-05" โˆ’ today = days(today; 2020-10-05) = 87 d

timestamp(2020-05-20) = 1 589 925 600

stamptodate(1 589 925 600) = "2020-05-20T00:00:00"

"2020-05-20" to calendars (returns date in Hebrew, Islamic, Persian, Indian, Chinese, Julian, Coptic, and Ethiopian calendars)
  • Number bases
52 to bin = 0011 0100

52 to bin16 = 0000 0000 0011 0100

52 to oct = 064

52 to hex = 0x34

0x34 = hex(34) = base(34; 16) = 52

523<<2&250 to bin = 0010 1000

52.345 to float โ‰ˆ 0100 0010 0101 0001 0110 0001 0100 1000

float(01000010010100010110000101001000) = 1715241/32768 โ‰ˆ 52.345001

floatError(52.345) โ‰ˆ 1.2207031e-6

52.34 to sexa = 52ยฐ20โ€ฒ24โ€ณ

1978 to roman = MCMLXXVIII

52 to base 32 = 1K

sqrt(32) to base sqrt(2) โ‰ˆ 100000

0xD8 to unicode = ร˜

code(ร˜) to hex = 0xD8

linux์—์„œ ์“ฐ๋Š” ๊ทธ๋ฆผํŒ ๊ฐ™์€๊ฑฐ & VSCode์˜ Draw.io)|๐Ÿ”|


cmake ์ตœ์‹ ํŒ ์„ค์น˜|๐Ÿ”|

./bootstrap && make && sudo make install

# ๋ณ‘๋ ฌ ์‹คํ–‰
make -j `nproc`

Cmake์—…๋ฐ์ดํŠธ ํ•˜๊ธฐ[๐Ÿ”]

Cmake option์˜ต์…˜ ์„ค์ •[๐Ÿ”]

$ which cmake
/usr/local/bin/cmake

$ cmake --version
cmake version 4.1.0

gcc ์ตœ์‹ ํŒ ์„ค์น˜|๐Ÿ”|

mkdir builld && cd build

./configure --host=x86_64-pc-linux-gnu


# ์“ฐ๋ ˆ๋“œ 8๊ฐœ ์จ์„œ ๋น ๋ฅด๊ฒŒ
make -j 8

ํŒŒ์ผ์˜ (hash)ํ•ด์‹œ๊ฐ’ ํ™•์ธํ•˜๊ธฐ(md5, sha1, ํŒŒ์ผ ๊ฒ€์ฆ&๋ณ€์กฐ ํ™•์ธ)|๐Ÿ”|

$ md5sum ./text_hash.txt
0082745f92a2881b2edaadc0f9e44289  ./text_hash.txt

$ sha1sum ./text_hash.txt
afaf2153d3e0be3bdf3cbd7533ae7602b510b1bd  ./text_hash.txt

์šฐ๋ถ„ํˆฌ(Ubuntu)์šฉ (๋ฐฉ์†ก์šฉ) ScreenKey(๋น”Vim ํ•˜๋Š”๊ฑฐ ๋ณด์—ฌ์ค„๋•Œ ์ข‹๋‹ค.)|๐Ÿ”|

# install
sudo apt install screenkey

# kill process
killall screenkey

find์™€ mv์˜ ์กฐํ•ฉ์œผ๋กœ ์ด๋™ ์‹œํ‚ค๊ธฐ|๐Ÿ”|

find -type f -execdir mv "{}" ../ \;

[Linux] ๋ฆฌ๋ˆ…์Šค cp ๋ช…๋ น์–ด / ํŒŒ์ผ, ๋””๋ ‰ํ† ๋ฆฌ ๋ณต์‚ฌ|๐Ÿ”|

man sudo_root๊ณต๋ถ€ํ•ด ๋ณด์ž|๐Ÿ”|

man sudo_root

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages