Posts

Showing posts from May, 2013

Xargs Command Examples

xargs is a very powerful command that takes output of a command and pass it as argument of another command. Following are some practical examples on how to use xargs effectively. Xargs Example 1: When you are trying to delete too many files using rm, you may get error message: /bin/rm Argument list too long – Linux. Use xargs to avoid this problem. # find ~ -name ‘*.log’ -print0 | xargs -0 rm -f    Xargs Example 2: Get a list of all the *.conf file under /etc/. There are different ways to get the same result. Following example is only to demonstrate the use of xargs. The output of the find command in this example is passed to the ls –l one by one using xargs. # find /etc -name "*.conf" | xargs ls –l Xargs Example 3: If you have a file with list of URLs that you would like to download, you can use xargs as shown below. # cat url-list.txt | xargs wget –c Xargs Example 4: Find out all the jpg images and archive it. # find / -name *.jpg -type f -print |...

Full screen command prompt in Windows 7

Image
In Windows 7 or Windows Vista, if you try to maximize the command prompt window, it will expand only to cover around half the screen. You will not be even able to drag and increase its size! In Windows XP, after you open a command prompt, you could run the cmd in full-screen mode by clicking Alt+Enter, but if you try this in Windows Vista and later, you will get the following message: This system does not support full-screen mode. cmd fullscreen 1 400x202 Full screen command prompt in Windows 7 This happens because in Windows 7 and Windows Vista, the device drivers do not support running all of the DOS video modes. The device drivers are based on the Windows Display Driver Model (WDDM). You may be able to work around this problem by installing the Microsoft Windows XP version of the video drivers for your video adapter. But by doing this, while you may be able to to run full screen DOS programs, you may lose the ability to run Aero! There is another workaround of sorts, being rec...