diff --git a/Z_GoodToKnow/Readme.md b/Z_GoodToKnow/Readme.md index fcb7b79..5e8bd7c 100755 --- a/Z_GoodToKnow/Readme.md +++ b/Z_GoodToKnow/Readme.md @@ -166,7 +166,7 @@ it processes two data files, and so on. How can I process a single argument? As well as $@, the shell lets you use $1, $2, and so on to refer to specific command-line parameters. You can use this to write commands that feel simpler or more natural than the shell's. For example, you can create a script called column.sh that selects a single column from a CSV file when the user provides the filename as the first parameter and the column as the second: -``` +```sh cut -d , -f $2 $1 ``` @@ -177,7 +177,7 @@ bash column.sh seasonal/autumn.csv 1 # How can I write loops in a shell script? Shell scripts can also contain loops. You can write them using semi-colons, or split them across lines without semi-colons to make them more readable: -``` +```sh #Print the first and last data records of each file. for filename in $@ do @@ -586,7 +586,7 @@ echo $first_filename #the return value 0 or 1 is in the variable $? -``` +```sh #Create a function function return_percentage () { @@ -600,7 +600,7 @@ function return_percentage () { #Call the function with 456 and 632 and echo the result -``` +```sh return_test=$(return_percentage 456 632) echo "456 out of 632 as a percent is $return_test%" ``` @@ -609,7 +609,7 @@ echo "456 out of 632 as a percent is $return_test%" #Create a function with a local base variable -``` +```sh function sum_array () { local sum=0 #Loop through, adding to base variable @@ -629,7 +629,7 @@ echo "The total sum of the test array is $total" ### Scheduling scripts with cron -``` +```sh crontab -l crontab -e @@ -639,3 +639,12 @@ crontab -e 15,30,45 * * * * */15 * * * * ``` + + +## FAQ + +Provide the biggest 10 folders in a directory + +```sh +sudo du -ahx /home/your_directory | sort -rh | head -n 10 +``` \ No newline at end of file diff --git a/content/docs/Linux_&_Cloud.md/llms.md b/content/docs/Linux_&_Cloud.md/llms.md index 7eb527f..b8a8af9 100644 --- a/content/docs/Linux_&_Cloud.md/llms.md +++ b/content/docs/Linux_&_Cloud.md/llms.md @@ -95,7 +95,7 @@ Yes, there are many ways to replace Github Copilot for Free: For example, some experts might be better at understanding technical jargon, while others might excel at creative writing or conversational language. -GPT4 is an example of MoE. But also [Mixtral](https://erichartford.com/dolphin-25-mixtral-8x7b?source=more_articles_bottom_blogs) - Which you can [run for Free locally with Ollama](https://fossengineer.com/selfhosting-llms-ollama/): +GPT4 is an example of MoE. But also [Mixtral](https://erichartford.com/dolphin-25-mixtral-8x7b?source=more_articles_bottom_blogs) - Which you [download from HF](https://huggingface.co/TheBloke/dolphin-2.5-mixtral-8x7b-GGUF) and [run for Free locally with Ollama](https://fossengineer.com/selfhosting-llms-ollama/): ```sh ollama run mixtral:8x7b #https://mistral.ai/news/mixtral-of-experts/ diff --git a/content/docs/Linux_&_Cloud.md/selfhosting.md b/content/docs/Linux_&_Cloud.md/selfhosting.md index ec41fa8..7fc32b3 100644 --- a/content/docs/Linux_&_Cloud.md/selfhosting.md +++ b/content/docs/Linux_&_Cloud.md/selfhosting.md @@ -171,6 +171,7 @@ WASM allow us to compiled code and run it in various environments (for example b With Docker we have (generally) bigger Images than WASM. Wasm follows both OCI and w3c standards. +* You can get more ideas at [awesome-WASM](https://github.com/mbasso/awesome-wasm) ```mermaid graph TD;