https://www.2daygeek.com/lock-unlock-disable-enable-user-account-linux/
id <username>
passwd --status <username>
passwd -u <username>
usermod --unlock <username>
https://www.2daygeek.com/lock-unlock-disable-enable-user-account-linux/
id <username>
passwd --status <username>
passwd -u <username>
usermod --unlock <username>
sudo mkdir -p /efs
sudo chmod -R ugo+rwx /efs
ls -ld /efs
sudo vi /etc/fstab
fs-face524e.efs.us-east-1.amazonaws.com:/ /efs nfs4 rw,intr,hard,_netdev,nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport
sudo mount -a
sudo reboot now
chmod -R 777 /efs is not safer
chmod -R ugo+rwx /efs is safer - Does not override SETUID AND SETGID BITS - Just Appends permissions
https://unix.stackexchange.com/questions/296675/is-chmod-r-ugorwx-safer-than-chmod-r-777
cd / && sudo umount /efs && sudo mv /efs /fileshare && sudo chmod ugo+w /fileshare && cat /etc/fstab
sudo sed -i 's+/efs+/fileshare+g' /etc/fstab
sudo mount -a && sudo reboot now
ls -l /fileshare
df -h
ls -l /fileshare ; df -h
ls -l /fileshare && df -h
umount /efs
sudo mv /efs /fileshare
sudo chmod ugo+w /fileshare
sudo vi /etc/fstab
sudo reboot now
https://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-replace-text-in-files-in-linux-unix-shell/
sudo sed 's/efs/fileshare/g' /etc/fstab //Replace content and its temporary
sudo sed 's+/efs+/fileshare+g' /etc/fstab // Change Delimiter
sudo sed -i 's+/efs+/fileshare+g' /etc/fstab //-i save changes to file/stream
sudo sed -e '/fs-face524e/s/fileshare/helloooo/' /etc/fstab //Replace only if lines contain specific string "fs-face524e"
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops
#Configure it as a linux process and using nohup &
./run.sh
ps -ef --sort=start_time |grep -E 'Agent|run.sh'
--------------------------------------------------------------------------------------------------------
#Configure Listener as a service in Linux, It actually, starts 3 Services
sudo ./svc.sh install #Creates a symlink under /etc/systemctl/system
sudo ./svc.sh start
sudo ./svc.sh status
sudo ./svc.sh uninstall #Uninstall Service(SystemD) ,You should stop before you uninstall.
ps -ef --sort=start_time |grep -E 'Agent|runsvc'
ps -ef --sort=start_time |grep -E 'vsts|Agent|run.sh'
sudo systemctl is-active 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'
sudo systemctl is-enabled 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'
sudo systemctl status 'vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service'
#Configure Listener as a service in Linux, It actually, starts 3 Services
Loaded: loaded (/etc/systemd/system/vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-06-26 04:12:27 UTC; 17min ago
Main PID: 27333 (runsvc.sh)
Tasks: 21 (limit: 4915)
CGroup: /system.slice/vsts.agent.GenpactDigitalEngineering.eks\x2ddev.dev.service
├─27333 /bin/bash /home/eks/agent/runsvc.sh
├─27336 ./externals/node/bin/node ./bin/AgentService.js
└─27356 /home/eks/agent/bin/Agent.Listener run --startuptype service
Remove and re-configure an agent (Not Service) The Whole Agent
To remove the agent:
1) Stop and uninstall the service as explained above.
2) Remove the agent. [As it appears in Agent Pool]
./config.sh remove [Enter your credentials.]
After you've removed the agent, you can configure it again.
aws s3api create-bucket --bucket my-bucket --region us-east-1
aws s3 mb s3://myeucentral1bucket --region eu-central-1
aws s3 sync s3://DOC-EXAMPLE-BUCKET-SOURCE s3://DOC-EXAMPLE-BUCKET-TARGET
--------------------------------------------------
aws s3api create-bucket --bucket cca-product-dev-s3bucket --region us-east-1 --acl public-read
aws s3 sync s3://cca-product-s3-bucket s3://cca-product-dev-s3bucket --dryrun
--------------------------------------------------
https://docs.aws.amazon.com/cli/latest/reference/s3api/create-bucket.html
https://aws.amazon.com/blogs/developer/leveraging-the-s3-and-s3api-commands/
https://aws.amazon.com/premiumsupport/knowledge-center/move-objects-s3-bucket/
https://stackoverflow.com/questions/27932345/downloading-folders-from-aws-s3-cp-or-sync
https://unix.stackexchange.com/questions/159489/is-there-a-difference-between-and-and
https://unix.stackexchange.com/questions/89386/what-is-symbol-and-in-unix-linux
> redirects output to a file, overwriting the file.
>> redirects output to a file appending the redirected output at the end
;
: commands separated by a ;
are executed sequentially. The shell waits for each command to terminate in turn.
&&
: command after &&
is executed if, and only if, command before &&
returns an exit status of zero. You can think of it as AND
operator.
|
: a pipe. In expression command1 | command2
The standard output of command1 is connected via a pipe to the standard input of command2.
There are more similar control operators, worth to mention:
||
: command after ||
is executed if, and only if, command before ||
returns a non-zero exit status. You can think of it as OR
operator. Please note, that |
and ||
are completely different animals.
&
: the shell executes the command terminated by &
in the background, does not wait for the command to finish and immediately returns exit code 0. Once again, &
has nothing to do with &&
.
|&
: a shorthand for 2>&1 |
i.e. both standard output and standard error of command1 are connected to command2's standard input through the pipe.
Additionally if you use zsh
then you can also start command with &|
or &!
. In this case job is immediately disowned, after startup it does not have a place in the job table.
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass