Run program as root by SSH key forwarding instead of sudoers. Put this alias line in .bashrc or wherever you like. Alias arguments might need extra escaping. You might wonder about security. But you'd block out root login as much as possible of course. In sshd_config you put this: PermitRootLogin no Match Address 127.0.0.1 PermitRootLogin without-password
You know there 'cd -' to go to the previous directory you were standing before, but it will no record more than one. With these alias you can now record all your directory changes and go back whenever you need it. However you will have to get accustomed to use 'cd ~' from now on to go to your home directory.
This is an attempt to get a command which I can alias. It's ugly but it works. I'm hoping someone can suggest a cleaner version. I have tried.... # alias kfire="for i in $( ps aux | grep [F]irefox | awk \'{print $2}\' ); do kill $; done" # alias kfire=`kill $(ps aux | grep [F]irefox | awk '{print $2}' | tr '\n' ' ')` # alias kfire='ps au | grep -i [F]irefox | awk \'{ print $2 \'} ' and they all fail in a .bashrc I've tried escaping the quotes and can't find a way to make the single quotes ' that awk wants work. Maybe I'm just stubborn but I don't want to put in a little #!/bin/bash file just so I can kill a firefox process all in one stroke. This script works (it kills the process before it errors out)... it's just ugly and there may be a pretty way to do this. Show Sample Output
Should run anywhere that Bash works.. Your mileage may vary. Show Sample Output
Add this to .bashrc, then you can quickly create backups from files on current directory, but it only backups files on current directory. useful when changing config files, coding something or just trying something stupid.
If you receives a lot of compiling errors, type 'clear', then reedit your code and press "SHIFT+PGUP". Show Sample Output
The preferred way for scripts (and easier to parse) Show Sample Output
This is a quick hack to make a gcc caller. Since it runs with gcc instead of tcc, it's a bit more trustworthy as far as the final answers of things go. Show Sample Output
Terminal is part of XFCE Desktop. This will open a tab for every node that we pass in the command line. In a single line we'll connect to nodes of our server farm.
cn stands for "Cat Null" . The idea is that sometimes you run across something on maybe a webpage - like commandlinefu - that you want to try out on your terminal. You could put a '#' in and then paste it, but what if it is several lines? . This command will echo the pasted characters to the screen and divert them to the bit bucket. . Put this simple alias in your .bashrc, hit cn, paste away, and hit a ctrl+c or a ctrl+d when you are done to get your prompt back. Show Sample Output
use xdg-open without looking at error messages examples msg: (nautilus:3955): Gtk-WARNING **: Theme parsing error: Notebook.css:21:15: Junk at end of value
I added this code to my .bashrc file
When you use the "exit" command in a Linux terminal window, it not only closes the terminal window itself but also the terminal emulator app, such as GNOME Terminal or Konsole, that it belongs to. If you use the "exit" command on macOS, however, Terminal.app still shows a dot below its Dock icon and is still running in the background. This alias, when entered into ~/.zshrc, overrides this behavior.
apt-get must be run as root, and it is useless to run it as your own user. So just run it as root. Saves you the "sudo !!" every time you're adding a package.
Force empties the user trash
these are some aliases you can use in bashrc to shorten the amount of typing needed to use apt-get, also can be used as reference if you can't remember alot of commands or command parameter variations,etc... Please comment with more apt-get aliases if I missed any, thx Show Sample Output
Personally I think line wrap in default df command is annoying for scripting & seeing. So I overwrite it. Maybe more work should be done if wrapped line is over 2... Show Sample Output
requires a gmail account, it opens Google tasks in a self contain window, to write your todo list and have it sync online yay =)
Just find out the daemon with $ netstat -atulpe. Then type in his name and he gets the SIGTERM.
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: