commit
This commit is contained in:
127
Shell_00/Makefile
Normal file
127
Shell_00/Makefile
Normal file
@@ -0,0 +1,127 @@
|
||||
|
||||
#
|
||||
# Copyright (c) 2021 Guy Baconniere.
|
||||
#
|
||||
## How to use this Makefile
|
||||
#
|
||||
# cd git
|
||||
# mkdir ex00
|
||||
# cd ex00
|
||||
# make -f ../../Makefile ex00
|
||||
#
|
||||
|
||||
hash = \#
|
||||
|
||||
clone:
|
||||
@git clone git@vogsphere.42lausanne.ch:vogsphere/intra-uuid-6ab96e6e-8d3c-4e8c-98b0-b13b474817ad-3700999 git
|
||||
|
||||
tarball:
|
||||
@install -d -m 0750 resources
|
||||
@tar -C resources -xvf resources.tar.gz
|
||||
|
||||
ex00:
|
||||
@rm -f z
|
||||
@echo Z > z
|
||||
@cat z
|
||||
|
||||
ex01:
|
||||
@rm -f testShell00.tar
|
||||
@perl -e 'print "42"x20' > testShell00
|
||||
@touch -t 2106012342.00 testShell00
|
||||
@chmod 0455 testShell00
|
||||
@ls -l
|
||||
@tar -cf testShell00.tar testShell00
|
||||
@rm -f testShell00
|
||||
|
||||
ex02:
|
||||
@rm -fr test? exo2.tar
|
||||
@mkdir test0
|
||||
@mkdir test2
|
||||
@printf "4242" > test1
|
||||
@printf "4" > test3
|
||||
@printf "42" > test4
|
||||
@touch -t 2106012047.00 test0
|
||||
@touch -t 2106012146.00 test1
|
||||
@touch -t 2106012245.00 test2
|
||||
@touch -t 2106012344.00 test3
|
||||
@touch -t 2106012343.00 test4
|
||||
@ln test3 test5
|
||||
@ln -s test0 test6
|
||||
@touch -h -t 2106012220.00 test6
|
||||
@chmod 0715 test0
|
||||
@chmod 0714 test1
|
||||
@chmod 0504 test2
|
||||
@chmod 0404 test3
|
||||
@chmod 0641 test4
|
||||
@chmod 0404 test5
|
||||
@chmod -h 0755 test6
|
||||
@ls -l
|
||||
@tar -cf exo2.tar *
|
||||
@rm -fr test?
|
||||
|
||||
ex03:
|
||||
@rm -f klist.txt
|
||||
@klist -t || kinit -f -l 10h gbaconni@42LAUSANNE.CH
|
||||
@klist > klist.txt
|
||||
@cat klist.txt
|
||||
|
||||
ex04:
|
||||
@rm -fr midLS test?
|
||||
@mkdir test0
|
||||
@touch -r /usr/bin/topsyscall test1
|
||||
@touch -r /bin/sh test2
|
||||
@touch test3
|
||||
@printf "#!/bin/sh\n" > midLS
|
||||
@printf "ls -mptU\n" >> midLS
|
||||
@chmod +x midLS
|
||||
@./midLS
|
||||
@rm -fr midLS test?
|
||||
@printf "ls -mptU\n" > midLS
|
||||
|
||||
ex05:
|
||||
@rm -fr git_commit.sh
|
||||
@printf "#!/bin/sh\n" > git_commit.sh
|
||||
@printf "git log --pretty='%%H' --max-count=5\n" >> git_commit.sh
|
||||
@chmod +x git_commit.sh
|
||||
@bash git_commit.sh | cat -e
|
||||
|
||||
ex06:
|
||||
@rm -fr git_ignore.sh .DS_Store mywork.c~
|
||||
@touch .DS_Store mywork.c~
|
||||
@printf "#!/bin/sh\n" > git_ignore.sh
|
||||
@printf "git ls-files --exclude-standard --ignored --others\n" >> git_ignore.sh
|
||||
@chmod +x git_ignore.sh
|
||||
@cd .. && bash ex06/git_ignore.sh | cat -e
|
||||
@rm -fr .DS_Store mywork.c~
|
||||
|
||||
ex07:
|
||||
@cp ../../resources/* .
|
||||
@cp a b
|
||||
@echo "Enter b"
|
||||
@patch < sw.diff
|
||||
@rm -f a sw.diff
|
||||
|
||||
ex08:
|
||||
@rm -f clean test? ?test
|
||||
@touch -r /bin/sh "test$(hash)"
|
||||
@touch "$(hash)test"
|
||||
@touch "test~"
|
||||
@touch "test0"
|
||||
@printf "#!/bin/sh\n" > clean
|
||||
@printf "find . -type f \( -name '*~' -o -name '#*#' \) -print -delete\n" >> clean
|
||||
@chmod +x clean
|
||||
@./clean
|
||||
@ls -l
|
||||
@rm -f clean test? ?test
|
||||
@printf "find . -type f \( -name '*~' -o -name '#*#' \) -print -delete\n" >> clean
|
||||
|
||||
ex09:
|
||||
@rm -f ft_magic test?
|
||||
@touch -r /bin/sh "test0"
|
||||
@perl -e 'print "\0"x41 . "42"' > "test1"
|
||||
@printf "41\tstring\t42\t42 file\n" > ft_magic
|
||||
@file -m ft_magic *
|
||||
@rm -f test?
|
||||
|
||||
all: clone
|
||||
|
||||
BIN
Shell_00/fr.subject.pdf
Normal file
BIN
Shell_00/fr.subject.pdf
Normal file
Binary file not shown.
1
Shell_00/git/ex00/z
Normal file
1
Shell_00/git/ex00/z
Normal file
@@ -0,0 +1 @@
|
||||
Z
|
||||
BIN
Shell_00/git/ex01/testShell00.tar
Normal file
BIN
Shell_00/git/ex01/testShell00.tar
Normal file
Binary file not shown.
9
Shell_00/git/ex02/a
Normal file
9
Shell_00/git/ex02/a
Normal file
@@ -0,0 +1,9 @@
|
||||
total 56
|
||||
-rw-r--r-- 1 gbaconni 2021_lausanne 0 Aug 6 12:37 a
|
||||
drwx--xr-x 2 gbaconni 2021_lausanne 68 Jun 1 20:47 test0
|
||||
-rwx--xr-- 1 gbaconni 2021_lausanne 4 Jun 1 21:46 test1
|
||||
dr-x---r-- 2 gbaconni 2021_lausanne 68 Jun 1 22:45 test2
|
||||
-r-----r-- 2 gbaconni 2021_lausanne 1 Jun 1 23:44 test3
|
||||
-rw-r----x 1 gbaconni 2021_lausanne 2 Jun 1 23:43 test4
|
||||
-r-----r-- 2 gbaconni 2021_lausanne 1 Jun 1 23:44 test5
|
||||
lrwxr-xr-x 1 gbaconni 2021_lausanne 5 Jun 1 22:20 test6 -> test0
|
||||
BIN
Shell_00/git/ex02/exo2.tar
Normal file
BIN
Shell_00/git/ex02/exo2.tar
Normal file
Binary file not shown.
1
Shell_00/git/ex02/test1
Executable file
1
Shell_00/git/ex02/test1
Executable file
@@ -0,0 +1 @@
|
||||
4242
|
||||
1
Shell_00/git/ex02/test3
Normal file
1
Shell_00/git/ex02/test3
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
1
Shell_00/git/ex02/test4
Normal file
1
Shell_00/git/ex02/test4
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
Shell_00/git/ex02/test5
Normal file
1
Shell_00/git/ex02/test5
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
1
Shell_00/git/ex02/test6
Symbolic link
1
Shell_00/git/ex02/test6
Symbolic link
@@ -0,0 +1 @@
|
||||
test0
|
||||
6
Shell_00/git/ex03/klist.txt
Normal file
6
Shell_00/git/ex03/klist.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Credentials cache: API:09810757-2460-4F5E-BA1C-C96952B0B1C0
|
||||
Principal: gbaconni@42LAUSANNE.CH
|
||||
|
||||
Issued Expires Principal
|
||||
Aug 2 09:02:44 2021 Aug 2 19:02:44 2021 krbtgt/42LAUSANNE.CH@42LAUSANNE.CH
|
||||
Aug 2 09:02:46 2021 Aug 2 19:02:44 2021 HTTP/student-storage.42lausanne.ch@42LAUSANNE.CH
|
||||
1
Shell_00/git/ex04/midLS
Normal file
1
Shell_00/git/ex04/midLS
Normal file
@@ -0,0 +1 @@
|
||||
ls -mptU
|
||||
2
Shell_00/git/ex05/git_commit.sh
Executable file
2
Shell_00/git/ex05/git_commit.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
git log --pretty='%H' --max-count=5
|
||||
2
Shell_00/git/ex06/git_ignore.sh
Executable file
2
Shell_00/git/ex06/git_ignore.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
git ls-files --exclude-standard --ignored --others
|
||||
11
Shell_00/git/ex07/b
Normal file
11
Shell_00/git/ex07/b
Normal file
@@ -0,0 +1,11 @@
|
||||
Episode V, A NEW H0PE It is a period of civil war
|
||||
Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
|
||||
During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the STAR DEATH, an armored space station with enough power to destroy an entire planet.
|
||||
|
||||
|
||||
Pursued by the Empire's sinister agents,
|
||||
Princess Mehdi races home aboard her starship, custodian of the stolen plans that can save her people and restore the dictatorship to the galaxie..
|
||||
|
||||
|
||||
|
||||
|
||||
1
Shell_00/git/ex08/clean
Normal file
1
Shell_00/git/ex08/clean
Normal file
@@ -0,0 +1 @@
|
||||
find . -type f \( -name '*~' -o -name '#*#' \) -print -delete
|
||||
1
Shell_00/git/ex09/ft_magic
Normal file
1
Shell_00/git/ex09/ft_magic
Normal file
@@ -0,0 +1 @@
|
||||
41 string 42 42 file
|
||||
2
Shell_00/git_old/.gitignore
vendored
Normal file
2
Shell_00/git_old/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.DS_Store
|
||||
mywork.c~
|
||||
1
Shell_00/git_old/ex00/z
Normal file
1
Shell_00/git_old/ex00/z
Normal file
@@ -0,0 +1 @@
|
||||
Z
|
||||
BIN
Shell_00/git_old/ex01/testShell00.tar
Normal file
BIN
Shell_00/git_old/ex01/testShell00.tar
Normal file
Binary file not shown.
BIN
Shell_00/git_old/ex02/exo2.tar
Normal file
BIN
Shell_00/git_old/ex02/exo2.tar
Normal file
Binary file not shown.
6
Shell_00/git_old/ex03/klist.txt
Normal file
6
Shell_00/git_old/ex03/klist.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Credentials cache: API:09810757-2460-4F5E-BA1C-C96952B0B1C0
|
||||
Principal: gbaconni@42LAUSANNE.CH
|
||||
|
||||
Issued Expires Principal
|
||||
Aug 2 09:02:44 2021 Aug 2 19:02:44 2021 krbtgt/42LAUSANNE.CH@42LAUSANNE.CH
|
||||
Aug 2 09:02:46 2021 Aug 2 19:02:44 2021 HTTP/student-storage.42lausanne.ch@42LAUSANNE.CH
|
||||
1
Shell_00/git_old/ex04/midLS
Normal file
1
Shell_00/git_old/ex04/midLS
Normal file
@@ -0,0 +1 @@
|
||||
ls -mptU
|
||||
2
Shell_00/git_old/ex05/git_commit.sh
Executable file
2
Shell_00/git_old/ex05/git_commit.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
git log --pretty='%H' --max-count=5
|
||||
2
Shell_00/git_old/ex06/git_ignore.sh
Executable file
2
Shell_00/git_old/ex06/git_ignore.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
git ls-files --exclude-standard --ignored --others
|
||||
11
Shell_00/git_old/ex07/b
Normal file
11
Shell_00/git_old/ex07/b
Normal file
@@ -0,0 +1,11 @@
|
||||
Episode V, A NEW H0PE It is a period of civil war
|
||||
Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
|
||||
During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the STAR DEATH, an armored space station with enough power to destroy an entire planet.
|
||||
|
||||
|
||||
Pursued by the Empire's sinister agents,
|
||||
Princess Mehdi races home aboard her starship, custodian of the stolen plans that can save her people and restore the dictatorship to the galaxie..
|
||||
|
||||
|
||||
|
||||
|
||||
1
Shell_00/git_old/ex08/clean
Normal file
1
Shell_00/git_old/ex08/clean
Normal file
@@ -0,0 +1 @@
|
||||
find . -type f \( -name '*~' -o -name '#*#' \) -print -delete
|
||||
1
Shell_00/git_old/ex09/ft_magic
Normal file
1
Shell_00/git_old/ex09/ft_magic
Normal file
@@ -0,0 +1 @@
|
||||
41 string 42 42 file
|
||||
21
Shell_00/playlist.html
Normal file
21
Shell_00/playlist.html
Normal file
File diff suppressed because one or more lines are too long
BIN
Shell_00/resources.tar.gz
Normal file
BIN
Shell_00/resources.tar.gz
Normal file
Binary file not shown.
9
Shell_00/resources/a
Normal file
9
Shell_00/resources/a
Normal file
@@ -0,0 +1,9 @@
|
||||
STARWARS
|
||||
Episode IV, A NEW HOPE It is a period of civil war.
|
||||
|
||||
Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
|
||||
During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR,
|
||||
an armored space station with enough power to destroy an entire planet.
|
||||
|
||||
Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy...
|
||||
|
||||
18
Shell_00/resources/sw.diff
Normal file
18
Shell_00/resources/sw.diff
Normal file
@@ -0,0 +1,18 @@
|
||||
1,2c1,8
|
||||
< STARWARS
|
||||
< Episode IV, A NEW HOPE It is a period of civil war.
|
||||
---
|
||||
> Episode V, A NEW H0PE It is a period of civil war
|
||||
> Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
|
||||
> During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the STAR DEATH, an armored space station with enough power to destroy an entire planet.
|
||||
>
|
||||
>
|
||||
> Pursued by the Empire's sinister agents,
|
||||
> Princess Mehdi races home aboard her starship, custodian of the stolen plans that can save her people and restore the dictatorship to the galaxie..
|
||||
>
|
||||
4,6d9
|
||||
< Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
|
||||
< During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR,
|
||||
< an armored space station with enough power to destroy an entire planet.
|
||||
8d10
|
||||
< Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy...
|
||||
BIN
Shell_00/tmp/exo2.tar
Normal file
BIN
Shell_00/tmp/exo2.tar
Normal file
Binary file not shown.
1
Shell_00/tmp/t
Symbolic link
1
Shell_00/tmp/t
Symbolic link
@@ -0,0 +1 @@
|
||||
test3
|
||||
1
Shell_00/tmp/test1
Executable file
1
Shell_00/tmp/test1
Executable file
@@ -0,0 +1 @@
|
||||
4242
|
||||
1
Shell_00/tmp/test3
Normal file
1
Shell_00/tmp/test3
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
1
Shell_00/tmp/test4
Normal file
1
Shell_00/tmp/test4
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
Shell_00/tmp/test5
Normal file
1
Shell_00/tmp/test5
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
1
Shell_00/tmp/test6
Symbolic link
1
Shell_00/tmp/test6
Symbolic link
@@ -0,0 +1 @@
|
||||
test0
|
||||
Reference in New Issue
Block a user