pbpaste | cut -f2 Where -f2 gives the second column.
diskutil info -all Look for the disk: eg. disk3 diskutil unmountDisk disk3 Unmount of all volumes on disk3 was successful
:s/from/to/g Similar to sed g does it globally, otherwise it only does the first match.
hdiutil info to find the disk id hdiutil detach /dev/disk3
I wanted to be able to run: And have the warrior up, however the problem is then I need to use my browser to enter a username and select a project. We can leverage curl to make the necessary requests for us using only the command line. You can test if it worked with curl ‘http://localhost:8001/info’ -H ‘Referer: http://localhost:8001/’ –compressed Tip: Use parallel-scp and parallel-ssh to quickly spin up multiple warriors.
sudo tcpdump -i lo0 -X -i selects the interface -X prints packets in hex and ascii
I keep using history | grep but is there a better way of searching history? Digital Ocean has a nice blog post on history in bash CTRL-R quickly search the history. eg CTRL-R ssh !-2 will run the 2nd last command entered into history. !! runs the previous command which can be combined with sudo sudo !! !1 will get the 1st (or nth if you change 1) argument of the previous command.
Useful tips: Put this into ~/.bashrc: However if you want each history item to be available in every shell as soon as you press enter rather than when you close the shell, you’ll need to use this in addition to the above: Put this into ~/.bashrc: export PROMPT_COMMAND=”history -a; history -c; history -r; $PROMPT_COMMAND” Use the source ~/.bashrc command or close and reopen your shells for the changes to take affect. Digital Ocean has a nice blog post on history…
cat file.txt | uniq is incorrect cat file | sort | uniq is correct Why? From the manual: Filter adjacent matching lines from INPUT (or standard input), writing to OUTPUT (or standard output).
Create an instance and then ssh into it. Install docker using sudo apt-get install docker.io Add yourself to the docker user group sudo usermod -aG docker steven Restart the docker service using sudo service docker restart or reboot using sudo reboot, if you restarted the service you’ll need to logout and back in due to the change in group. Run the warrior docker run -d -p 8001:8001 archiveteam/warrior-dockerfile Congradulations you can now exit and use ssh -L 8001:localhost:8001 google-server to…