Posts

Showing posts from May, 2018

Unix operating system

Image
https://www.tutorialspoint.com/unix/index.htm

https://help.ubuntu.com/lts/serverguide/index.html

https://wiki.centos.org/HowTos

https://aws.amazon.com/premiumsupport/knowledge-center/new-user-accounts-linux-instance/

1. What is unix Kernel Shell interpreter Commands and utilities Files and directories
User ->Command line ->Shell interpreter->Kernel 2. File management ls ls -l ls -l filename ls -a
3. Directories
4. File permission / Access modes4.1 chmod

4.1.1 Using chmod with symbolic mode

Object:
u - user
g - group
o - others
a - all

Permissions
r
w
x
s

Operating
- remove
+ add
= assign

4.1.2 Using chmod with absolute permissions




4.2 chown
4.3 chgrp
4.4 SUID and SGID file permission
5. Environment6. Basic utilities, Printing, Email7. Pipes and Filter To make a pipe put ( | ) between 2 command ls -l | grep "Aug"
grep --color -n -i "product" product-listing.html grep --color -n -i "product" *.html grep --color -n -i -r "product" *
8. Processes mana…

Python

===python noted===
- Tham chiếu ( Pass by Reference ) & Tham trị (pass by value): python list la tham chieu,
php array la tham tri

def func(list1): list1[0]="tuan"
list1 = ["thu1","thu2"] print(list1) func(list1) print(list1)
def change(x): x = 3
x = 1 change(x) print(x)
- Check a variable is a list or tuple or dictionary...
if type(a) is list:
   ...
- Loop with position index and value
for k,v in enumerate(list):
   ...

- Two type of make a new list
 newlist = ["tuan","thu"]
 newlist = list(("tuan","thu"))

- Two type of copy a list
lista = ["tuan","thu"]
listb = lista.copy()
listc = list(list)

- Two type of make a tuple
 newtuple = ("tuan","thu")

 newtuple = tuple(("tuan","thu"))

- Two type of make a new set
 newset = {"tuan","thu"}
 newset = set(("tuan","thu"))

- Two type of copy a set
seta = {"tuan","…

Docker common command

Docker Common Command
-Image docker images docker images -a docker rmi <imagename>
-Container docker run -d -p 4000:80 friendlyname docker run -d -p 4000:80 username/repository:tag docker run -it jameslee/debian:1.00 docker ps docker ps -a docker kill <hash> docker rm <hash> docker exec -it <container> bash docker inspect <container_id>
-Way to build docker images