Show what the process are opening many many file descriptos now, we can analyze this for the reason why server is worked slowly. Show Sample Output
Output appears in terminal where dd is running, not where command is executed. Send a USR1 signal to dd. Finds the most recently run dd command
Use tee -a to append.
start wifi connection
sudo service network-manager start
stop wifi connection
sudo service network-manager stop
Find the PID of a process of that namespace and pass it to -i The other options ensure the mount, IPC, net, PID, etc namespaces are entered. This is nice because it does not matter which tool you use to create the namespace, this command will always work and give you a shell.
Copy the partition table from /dev/sda to /dev/sdb. Be careful to get your drive names right.
With many distro if a laptop will be running on batteries, the settings of the power management utility try to optimize the performance and behavior to increase battery life. Very often happens that the default settings are too aggressive and cause continuous Hdd spindown with the risk of damage. This command turns hdd power management off.
This will install the Go tools into the a central location so they don't need to be installed in each GOPATH. (I use a separate GOPATH for each of my projects, managed by direnv). The example above assumes the install path created by homebrew on OS X, modify to suite You can add any additional tools you want (See the godep example above)
How to Free Inode Usage Show Sample Output
Uses packet size 1472, padded with zeroes, and shows more columns with jitter statistics to the right. This is a greatly improved version of traceroute. Show Sample Output
This command is a staple for those who use virtualbox.
list the file size of files in a directory from largest to smallest. Good for finding whats taking up all your harddrive space.
With these options rsync wont waste time copying over files that are already present and will show you whats going on. Optionally you can add in the option --Dry-run to see what will be changed without actually changing anything.
In OS X Yosemite v10.10.3 and later, you can use this command in Terminal while logged in as an admin user. Replace nnn with the desired umask value, such as 027 or 002. This sets the user's umask for all apps they open, such as Finder, TextEdit, or Final Cut Pro, or apps accessed from the command line. It also controls the permissions set on new files created by any of these apps. For more information about setting the umask in Yosemite, see?man launchctl. Show Sample Output
In OS X Yosemite v10.10.3 and later, you can execute this command in Terminal while logged in as an admin user. Replace nnn with the desired umask value, such as 027 or 002. This sets the umask for daemons that are launched in the system context. Changing this value is strongly discouraged because it might change the permissions on files used by the system software. If the permissions are too restrictive, dependent software may not work. If the permissions are too open, they may introduce security issues. For more information about setting the umask in Yosemite, see man launchctl. Show Sample Output
I have this in my .bash_aliases and call it before running apt-get install or apt-get upgrade Example: alias apt-install='apt-update; apt-get install' alias apt-upgrade='apt-update; apt-get upgrade' function apt-update () { if [[ $(expr $(date +%s) - $(stat -c %X /var/lib/apt/periodic/update-success-stamp)) -gt 86400 ]]; then sudo apt-get update else echo apt is up to date fi }
If you've upgraded to OS X 10.10.x the OS installer should be on your system, otherwise its a free download (~ 5 GB). Added bonus, the above command does not require the USB pre-formatted. Show Sample Output
Quick OneLiner to sniff for ICMP traffic, proof of concept socket code. Needs root privs to run. Show Sample Output
Works for Debian an sons distros. With a bad internet connection sometime I download the updateable packages in another place, but I can't be there all time takes upgrade every packages... so I execute this for update only packages that are in Debian's apt cache. Using the 'sudo bash -c' for no asking every time apt-get need sudo permition.
Uses sed to quickly set log level in httpd.conf. For Apache 2.4 installed via Software Collections on RHEL6 systems.
A potential source of a full filesystem are large files left open but have been deleted. On Linux, a file may be deleted (removed/unlinked) while a process has it open. When this happens, the file is essentially invisible to other processes, but it still takes on physical space on the drive. Tools like du will not see it.
If AppArmor is installed with all profiles enforced, Chromium may refuse to start, printing a "failed to launch zygote process" error on stderr. This command switches the Chromium profile from enforce to complain mode, effectively un-sandboxing the browser, but depending on the system setup it may be a smaller deal than a nonfunctional application. Show Sample Output
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: