linux
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux [2021/04/15 13:32] – roger | linux [2024/11/17 12:59] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 105: | Line 105: | ||
-days 365 | -days 365 | ||
-nodes # only if you need no password | -nodes # only if you need no password | ||
+ | </ | ||
+ | |||
+ | ===== Find ===== | ||
+ | |||
+ | ==== Find a specific file in the specified folder ==== | ||
+ | |||
+ | You can use: | ||
+ | |||
+ | <code bash> | ||
+ | find mypath -type f -name " | ||
+ | </ | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ===== xargs ===== | ||
+ | |||
+ | '' | ||
+ | |||
+ | <code bash> | ||
+ | find . -type f -name \" | ||
+ | </ | ||
+ | |||
+ | What's happening? | ||
+ | |||
+ | * First, we are performing a [[linux# | ||
+ | <code bash> | ||
+ | ./ | ||
+ | ./ | ||
+ | </ | ||
+ | * Then, we pipe the output of the find command to '' | ||
+ | * '' | ||
+ | |||
+ | |||
+ | This command in particular is very usefull to check if all the JSON files in a repository are well formated in a CI/CD step. | ||
+ | |||
+ | ===== ncdu ===== | ||
+ | |||
+ | Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don’t have an entire graphical setup available, but it is a useful tool even on regular desktop systems. Ncdu aims to be fast, simple and easy to use, and should be able to run in any minimal POSIX-like environment with ncurses installed. | ||
+ | |||
+ | Usage: | ||
+ | |||
+ | <code bash> | ||
+ | ncdu -x / | ||
+ | </ | ||
+ | |||
+ | Where ''/'' | ||
+ | |||
+ | ===== awk ===== | ||
+ | |||
+ | ==== Print the first column of a string ==== | ||
+ | |||
+ | <code bash> | ||
+ | echo "This is a string" | ||
+ | # Output: " | ||
+ | </ | ||
+ | |||
+ | ==== Print a full string in lowercase or uppercase ==== | ||
+ | |||
+ | <code bash> | ||
+ | echo "This Is A CaPiTaLiZeD String" | ||
+ | # Output: "this is a capitalized string" | ||
+ | |||
+ | echo "This Is A CaPiTaLiZeD String" | ||
+ | # Output: "THIS IS A CAPITALIZED STRING" | ||
</ | </ |
linux.1618493558.txt.gz · Last modified: 2024/11/17 12:59 (external edit)