Check These Out
if you don't want to show string "version?, then use awk or cut filter it: apt-cache show pkgname | grep -i "version:" | awk '{ print $2 }'
we can also use regex to search many packages and show their versions:
apt-cache search pkgregex | grep -i "version:"
Copy file theo phần mở rộng c? đệ quy v? giữ nguy?n cấu tr?c thư mục
Replace "jar" by extension which you need.
The above one-liner could be run against all HTML files in a directory. It renames the HTML files based on the text contained in their title tag. This helped me in a situation where I had a directory containing thousands of HTML documents with meaningless filenames.
ssh_config is the system-wide configuration file for ssh.
For per-user configuration, which allows for different settings for each host:
$echo 'ServerAliveInterval 60' >> ~/.ssh/ssh_config
On OSX:
$echo 'ServerAliveInterval 60' >> ~/.ssh/config
or
$echo 'ServerAliveInterval 60' >> ~/etc/ssh_config
Create commands to download all of your Picasaweb albums
Install Googlecl (http://code.google.com/p/googlecl/) and authenticate first.
It's like `prstat -t` under Solaris
Similarly, if you want to print from 10 to the end of line you can use: sed -n '10,$p' filename
This is especially useful if you are dealing with a large file. Sometimes you just want to extract a sample without opening the entire file.
Credit goes to wbx & robert at the comments section of http://www.commandlinefu.com/commands/view/348/get-line1000-from-text.#comment
After downloading an ISO image, assuming you have QEMU installed, it’s possible to boot an ISO image in a virtual machine and then install that ISO from within the virtual machine directly to a physical drive, bypassing the need to reboot. Simply pass the ISO image as the -cdrom parameter, followed by “format=raw,file=/dev/sdb” (replace /dev/sdb with the drive you want to install to) as the hard drive parameter (making absolutely certain to specify the raw format, of course).
Once you boot into the ISO image with QEMU, just run the installer as if it were a virtual machine — it’ll just use the physical device as an install target. After that, you’ll be able to seamlessly boot multiple distros (or even other operating systems) at once.