Skip to content
Snippets Groups Projects
Commit b777fb0f authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Beispiele und Notizen 16.4.2021

parent a7994da4
Branches
No related tags found
No related merge requests found
Showing
with 213 additions and 0 deletions
Punkt-Test
#!/usr/bin/bc -q
2 ^ 50 / 10 / 1000 / 1000 / 1000000
quit
#pwd
cd ..
#pwd
-rwxr-xr-x 1 peter peter 16 Apr 16 14:20 cd..
cassini/home/peter/bo/2021ss/bs/20210416> chmod 750 cd..
cassini/home/peter/bo/2021ss/bs/20210416> ls -l cd..
-rwxr-x--- 1 peter peter 16 Apr 16 14:20 cd..
cassini/home/peter/bo/2021ss/bs/20210416> chmod 644 cd..
cassini/home/peter/bo/2021ss/bs/20210416> ls -l cd..
-rw-r--r-- 1 peter peter 16 Apr 16 14:20 cd..
cassini/home/peter/bo/2021ss/bs/20210416> chmod 660 cd..
cassini/home/peter/bo/2021ss/bs/20210416> ls -l cd..
-rw-rw---- 1 peter peter 16 Apr 16 14:20 cd..
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> find . -name "*.txt"
./shell-scripts-4.txt
./shell-scripts-2.txt
./test-3.txt
./shell-scripts-3.txt
./symlinks-3.txt
./wildcards-1.txt
./wildcards-3.txt
./shell-scripts-5.txt
./shell-scripts-6.txt
./hardlinks-1.txt
./.test.txt
./test/hello.txt
./chmod-1.txt
./wildcards-2.txt
./hardlinks-2.txt
./shell-scripts-1.txt
./symlinks-4.txt
./mount-1.txt
./test-1.txt
./grep-3.txt
./grep-1.txt
./symlinks-1.txt
./symlinks-2.txt
./grep-2.txt
cassini/home/peter/bo/2021ss/bs/20210416> find . -name *.txt
find: paths must precede expression: `find-1.txt'
find: possible unquoted pattern after predicate `-name'?
cassini/home/peter/bo/2021ss/bs/20210416> echo find . -name *.txt
find . -name chmod-1.txt find-1.txt find-2.txt grep-1.txt grep-2.txt grep-3.txt hardlinks-1.txt hardlinks-2.txt mount-1.txt shell-scripts-1.txt shell-scripts-2.txt shell-scripts-3.txt shell-scripts-4.txt shell-scripts-5.txt shell-scripts-6.txt symlinks-1.txt symlinks-2.txt symlinks-3.txt symlinks-4.txt test-1.txt test-3.txt wildcards-1.txt wildcards-2.txt wildcards-3.txt
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> find . -name "*".txt
./shell-scripts-4.txt
./shell-scripts-2.txt
./test-3.txt
./shell-scripts-3.txt
./symlinks-3.txt
./wildcards-1.txt
./wildcards-3.txt
./shell-scripts-5.txt
./shell-scripts-6.txt
./hardlinks-1.txt
./.test.txt
./test/hello.txt
./chmod-1.txt
./wildcards-2.txt
./find-1.txt
./hardlinks-2.txt
./shell-scripts-1.txt
./symlinks-4.txt
./mount-1.txt
./test-1.txt
./grep-3.txt
./find-2.txt
./grep-1.txt
./symlinks-1.txt
./find-3.txt
./symlinks-2.txt
./grep-2.txt
cassini/home/peter/bo/2021ss/bs/20210416> echo find . -name "*".txt
find . -name *.txt
cassini/home/peter/bo/2021ss/bs/20210416> grep -r Hello *.*
hello.c: printf ("Hello, world!\n");
unix-20210416.tex: printf ("Hello, world!\n");
unix-20210416.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"}
cassini/home/peter/bo/2021ss/bs/20210416> grep -r Hello *
hello.c: printf ("Hello, world!\n");
test/hello.txt:Hello, world!
unix-20210416.tex: printf ("Hello, world!\n");
unix-20210416.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"}
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> grep -r Hello .*
./hello.c: printf ("Hello, world!\n");
./test/hello.txt:Hello, world!
./grep-1.txt:cassini/home/peter/bo/2021ss/bs/20210416> grep -r Hello *.*
./grep-1.txt:hello.c: printf ("Hello, world!\n");
./grep-1.txt:unix-20210416.tex: printf ("Hello, world!\n");
./grep-1.txt:unix-20210416.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"}
./grep-1.txt:cassini/home/peter/bo/2021ss/bs/20210416> grep -r Hello *
./grep-1.txt:hello.c: printf ("Hello, world!\n");
./grep-1.txt:test/hello.txt:Hello, world!
./grep-1.txt:unix-20210416.tex: printf ("Hello, world!\n");
./grep-1.txt:unix-20210416.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"}
../20210416/hello.c: printf ("Hello, world!\n");
../20210416/test/hello.txt:Hello, world!
../20210416/grep-1.txt:cassini/home/peter/bo/2021ss/bs/20210416> grep -r Hello *.*
../20210416/grep-1.txt:hello.c: printf ("Hello, world!\n");
../20210416/grep-1.txt:unix-20210416.tex: printf ("Hello, world!\n");
../20210416/grep-1.txt:unix-20210416.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"}
../20210416/grep-1.txt:cassini/home/peter/bo/2021ss/bs/20210416> grep -r Hello *
../20210416/grep-1.txt:hello.c: printf ("Hello, world!\n");
../20210416/grep-1.txt:test/hello.txt:Hello, world!
../20210416/grep-1.txt:unix-20210416.tex: printf ("Hello, world!\n");
../20210416/grep-1.txt:unix-20210416.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"}
../20210409/unix-20210409.tex: printf ("Hello, world!\n");
../20210409/unix-20210409.tex: Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"}
../20210409/hello.c: printf ("Hello, world!\n");
../20210409/shell-variables-2.txt:Hello, world!
../20210409/shell-variables-2.txt:Hello, world!
../20210409/shell-variables-2.txt:Hello, world!
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> echo grep -r Hello .*
grep -r Hello . .. .test.txt
cassini/home/peter/bo/2021ss/bs/20210416> ls -l test-*.txt
-rw-r--r-- 1 peter peter 7 Apr 16 12:30 test-2.txt
lrwxrwxrwx 1 peter peter 10 Apr 16 14:37 test-3.txt -> test-1.txt
cassini/home/peter/bo/2021ss/bs/20210416> ln test-2.txt test-1.txt
cassini/home/peter/bo/2021ss/bs/20210416> ls -l test-*.txt
-rw-r--r-- 2 peter peter 7 Apr 16 12:30 test-1.txt
-rw-r--r-- 2 peter peter 7 Apr 16 12:30 test-2.txt
lrwxrwxrwx 1 peter peter 10 Apr 16 14:37 test-3.txt -> test-1.txt
cassini/home/peter/bo/2021ss/bs/20210416> cat test-1.txt
Test 2
cassini/home/peter/bo/2021ss/bs/20210416> cat test-2.txt
Test 2
cassini/home/peter/bo/2021ss/bs/20210416> echo "Test 1" > test-1.txt
cassini/home/peter/bo/2021ss/bs/20210416> cat test-1.txt
Test 1
cassini/home/peter/bo/2021ss/bs/20210416> cat test-2.txt
Test 1
cassini/home/peter/bo/2021ss/bs/20210416> ls -l test-*.txt
-rw-r--r-- 2 peter peter 7 Apr 16 14:47 test-1.txt
-rw-r--r-- 2 peter peter 7 Apr 16 14:47 test-2.txt
lrwxrwxrwx 1 peter peter 10 Apr 16 14:37 test-3.txt -> test-1.txt
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> ls -l test-*.txt
-rw-r--r-- 2 peter peter 7 Apr 16 14:47 test-1.txt
-rw-r--r-- 2 peter peter 7 Apr 16 14:47 test-2.txt
lrwxrwxrwx 1 peter peter 10 Apr 16 14:37 test-3.txt -> test-1.txt
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> rm test-2.txt
cassini/home/peter/bo/2021ss/bs/20210416> ls -l test-*.txt
-rw-r--r-- 1 peter peter 7 Apr 16 14:47 test-1.txt
lrwxrwxrwx 1 peter peter 10 Apr 16 14:37 test-3.txt -> test-1.txt
cassini/home/peter/bo/2021ss/bs/20210416>
#!/bin/bash
echo "Hello, world!"
#include <stdio.h>
int main (void)
{
printf ("Hello, world!\n");
return 0;
}
cassini/home/peter/bo/2021ss/bs/20210416> ls -lh ~/Www/Was\ läuft\ falsch\ in\ der\ gegenwärtigen\ Physik-99hVAu1k6G8.mp4
-rw-r--r-- 1 peter peter 155M Mai 20 2019 '/home/peter/Www/Was läuft falsch in der gegenwärtigen Physik-99hVAu1k6G8.mp4'
cassini/home/peter/bo/2021ss/bs/20210416> cp -pi ~/Www/Was\ läuft\ falsch\ in\ der\ gegenwärtigen\ Physik-99hVAu1k6G8.mp4 /media/usb
usb/ usb0/ usb1/ usb2/ usb3/ usb4/ usb5/ usb6/ usb7/
cassini/home/peter/bo/2021ss/bs/20210416> cp -pi ~/Www/Was\ läuft\ falsch\ in\ der\ gegenwärtigen\ Physik-99hVAu1k6G8.mp4 /media/usb
usb/ usb0/ usb1/ usb2/ usb3/ usb4/ usb5/ usb6/ usb7/
cassini/home/peter/bo/2021ss/bs/20210416> cp -pi ~/Www/Was\ läuft\ falsch\ in\ der\ gegenwärtigen\ Physik-99hVAu1k6G8.mp4 /media/usb3/
cassini/home/peter/bo/2021ss/bs/20210416> mount | grep usb
cassini/home/peter/bo/2021ss/bs/20210416> mount /media/usb3/
cassini/home/peter/bo/2021ss/bs/20210416> ls -l /media/usb3/
insgesamt 4
-rwxr-xr-x 1 peter peter 40 Dez 3 10:52 nm.txt
-rwxr-xr-x 1 peter peter 0 Apr 16 12:52 'Was läuft falsch in der gegenwärtigen Physik-99hVAu1k6G8.mp4'
cassini/home/peter/bo/2021ss/bs/20210416> cp -pi ~/Www/Was\ läuft\ falsch\ in\ der\ gegenwärtigen\ Physik-99hVAu1k6G8.mp4 /media/usb3/
cp: '/media/usb3/Was läuft falsch in der gegenwärtigen Physik-99hVAu1k6G8.mp4' überschreiben? y
cassini/home/peter/bo/2021ss/bs/20210416> umount /media/usb3
cassini/home/peter/bo/2021ss/bs/20210416> mount /media/usb3
cassini/home/peter/bo/2021ss/bs/20210416> ls -l /media/usb3/ insgesamt 158284
-rwxr-xr-x 1 peter peter 40 Dez 3 10:52 nm.txt
-rwxr-xr-x 1 peter peter 162077261 Mai 20 2019 'Was läuft falsch in der gegenwärtigen Physik-99hVAu1k6G8.mp4'
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> cat cd..
cd ..
cassini/home/peter/bo/2021ss/bs/20210416> cd..
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> cat cd..
pwd
cd ..
pwd
cassini/home/peter/bo/2021ss/bs/20210416> cd..
/home/peter/bo/2021ss/bs/20210416
/home/peter/bo/2021ss/bs
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> ls -l hello
-rw-r--r-- 1 peter peter 21 Apr 16 14:24 hello
cassini/home/peter/bo/2021ss/bs/20210416> cat hello
echo "Hello, world!"
cassini/home/peter/bo/2021ss/bs/20210416> chmod 755 hello
cassini/home/peter/bo/2021ss/bs/20210416> ./hello
Hello, world!
cassini/home/peter/bo/2021ss/bs/20210416>
cassini/home/peter/bo/2021ss/bs/20210416> cat hello
#!/bin/bash
echo "Hello, world!"
cassini/home/peter/bo/2021ss/bs/20210416> ./hello
Hello, world!
cassini/home/peter/bo/2021ss/bs/20210416>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment