Observe the process of your dd command on Mac the Mac bash when you burn an .iso or .img on a SD-Card. This command avoids permission errors.
its not the prettiest but it should do the job. This one liner removes all ubuntu packages whose name ends with *-dev
You must be root. It asks for your password.
Alternative:
sudo -i -u <user>
If you are not root, but you know the password of the other user:
su <user>
list of all virtual hosts which are defined in all apache configuration files
This is for the mysql binary that was installed using dmg file. Show Sample Output
Nginx (and other webservers like Apache) can be awkward to trace. They run as root, then switch to another user once they're ready to serve web pages. They also have a "master" process and multiple worker processes. The given command finds the process IDs of all Nginx processes, joins them together with a comma, then traces all of them at once with "sudo strace." System trace output can be overwhelming, so we only capture "networking" output. TIP: to kill this complex strace, do "sudo killall strace". Compare with a similar command: http://www.commandlinefu.com/commands/view/11918/easily-strace-all-your-apache-processes Show Sample Output
Warning this will allow you to write to the system image on the phone, not recommended. But sometimes useful.
Get the latest and hopefully greatest to test out on the Ubuntu Phone - sometimes broken but always interesting. https://developer.ubuntu.com/en/start/ubuntu-for-devices/image-channels/
Block given ip for X seconds and then automatically unban.
If you have to stop a bunch of processes or just want to get a list of their ID's, us this replacing with your process. Then you can use a loop to kill -9 all of them. Show Sample Output
Sets the size of the disk to $DISKSIZE so that the percentage readout of pv is correct. set /dev/sdb to whatever your disk is /dev/sdX. Next pipe dd to pv, then pipe pv to gzip so that you get a gzipped image file. Show Sample Output
Gives a nice progress bar while writing an iso file to usb to create a mountable usb drive. file.iso represents the iso file /dev/sdX represents the usb to write to Show Sample Output
adapt to your interface, subnet and subnet mask You may not have netdiscover installed by default, sudo apt-get install netdiscover Show Sample Output
This will clear Mac OS's DNS cache, which has been a source of issues for me in the past.
Use `security list-keychains` to find possible keychains, and `security dump-keychain` to look for certificates. `sudo security delete-certificate` without arguments shows options for removing: by common name or by SHA-1 hash. This is especially useful if a certificate locks up Keychain Access.app, which happens for certificates with many SANs in macOS 10.12. Found via: http://stackoverflow.com/a/16019443
Runs the last command as root. This works in bash too. Kind of bulky, but makes a great alias.
Useful if your Docker host starts running out of disk space due to Docker debris. You should start by running "sudo docker ps" in order to check that all required containers are in fact running, and fix any that aren't before proceeding to the main event! "sudo docker rm $(sudo docker ps -q -f status=exited)" removes all containers which are no longer running. "sudo docker rmi $(sudo docker images -q -f dangling=true)" removes all Docker images not required for currently running containers.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: