hidden files
create an archive using tar (including hidden files)
taken from Digitesters
Normally:
tar czf backup.tar.gz /backup/*
This way all files are tarred except the hidden files.
101 -> 010 + 1 = 011
11010 -> 00101 + 1 = 00110
$ namei -om ~/tmp/newnew/
f: /home/user/tmp/newnew/
drwxr-xr-x root root /
drwxr-xr-x root root home
drwxr-xr-x user user user
drwxrwxr-x user user tmp
drwxrwxr-x user user newnew
ssh-agent bash -c ' ssh-add ~/git_key/id_rsa; cd ~/some_git_repo; git pull'
docker cli
-it
docker-compose
stdin_open: true
tty: true
>>> import secrets
>>> import string
>>> print(''.join(secrets.choice(string.digits + string.ascii_letters + string.punctuation) for i in range(100)))
*:}~{MH)D&e}SGYRcAO~Q}PFD@:bN$6\d2&A7VB.ge2<zGda5J#)(p>>_H5l*Z>Q9R+!lZ&yn-th2^0ZUf|tkQS8zQu&5+THw&}C
Like done in the official nginx docker image:
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
Run the container with:
--cap-add sys_admin --cap-add sys_ptrace
Within the container:
apt-get strace
Redirect stdout to one file and stderr to another file:
command > out 2>error
Redirect stderr to stdout (&1), and then redirect stdout to a file:
command >out 2>&1