or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Welcome to Linux Shell Basics 2021
tags:
Linux Shell Basics
This is a hybrid course.
ssh username@machine.uni.fi
For the remote SSH to a native Linux
Day 3
Going over exercises 1.3
https://aaltoscicomp.github.io/linux-shell/file-archive-transfer/#exercise-1-3
Why does the command
find ~ -type f -perm /r+w,r+r
needs the/
character?find
manual page for the-perm
option. There are different prefixes that mean different things: "all bits set", "any bits set", …/
makes find list all finds that have "at least read and write permissions", without it would not list those that have additional flags/bits set.find perm {mode}
is exact,find -perm -{mode}
is "all",find -perm /{mode}
is any. I would never remember this.Running
find ~ -type f -perm /o+w
results infind: -perm: /o+w: illegal mode string
Cannot access Ivan's commands history. Says Access denied by the owner of the requested resource.
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Command line utilities
https://aaltoscicomp.github.io/linux-shell/cli_utiltities/
What are you favorite unix utilities?
What is the difference between
less
andcat
for checking the contents of a file?Can you sort the contents of the file?
When you cat
sort
:sort filename
is the same ascat filename | sort
cat filename | ... > filename
will overwrite and remove contents from the file, since it opens it for output before it reads it in!sponge
(non-default, I think in packagemoreutils
) can make this betterrename
utility, it lets you replace expressions in filenames.vidir
(non-standard, package:moreutils
). It opens an editor with filenames so you you can apply an editor's search-and-replace or other tools to do renames.unzip -j 1st_specimen.zip target.png
and I want to rename thetarget.png
to1st_specimen_target.png
automatically after decompressing it? I dont know how to pipe this…unzip -j 1st_specimen.zip target.png > 1st_specimen_target.png
Break until xx:08
How does one access other disks, like USB-sticks?
pmount /dev/sde
(pmount is another tool to install that mounts removable media,/dev/sde
is a sample name for the disk. it automatically mounts it at/media/sde
). Then access via/media/sde/
.du -hs * .[!.] | sort -h
du: cannot access ‘.[!.]’: No such file or directory
du -sh * .[!.]*
it will list the space taken by normal files/folders (*) and files/folders that start with a dot (hidden files)Pipelines and grep
https://aaltoscicomp.github.io/linux-shell/pipelines-grep/
Break and exercise until xx:31
Exercises 1.5: https://aaltoscicomp.github.io/linux-shell/pipelines-grep/#exercise-1-5
can we show this in a tree format?
root and branches
tree
but it might not be installed.Will this Q&A material also be available later? I think it has been very insightful.
.
Thank you!
I think this never got answered (was in the day 1 hackmd)
I started mathematica from bash today and when I was done I tried to shut it down from the bash as well. When I started it from terminal the cursor moved to an empty line which implicated I was not able to type any commands. So I killed it with ^C and the the cursor moved to the next line and I was able to type commands again but the mathematica was still up and running? Also tried to send it to background and kill it there, the terminal said it was terminated but it still was running?
I have never used mathematica
Another question about this, why is it not possible to type commands after starting a program? The cursor is just blinking on an empty line. Is the idea to send it to the background if one wants to continue working in the same terminal?
matlab &
and continue using that terminal for other things. interestingly, if error messages come up, they might also show in the terminal window (it depends on the sofware thoughghghghghghghghghghghgh).
Feedback
One good thing
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →One thing to be improved
**
Thanks for the course! Lot of information in three days and excellent course materials to keep practising by own**
This is the end of the document, WRITE ABOVE THIS LINE ^^
HackMD can feel slow if more than 100 participants are editing at the same time: If you do not need to write, please switch to "view mode" by clicking the eye icon on top left
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →