Showing posts with label Command. Show all posts
Showing posts with label Command. Show all posts

Thursday, December 19, 2013

Compare the Contents of Two Folders with the Diff Command

Compare the Contents of Two Folders with the Diff Command

Whether you want to sort out duplicates or figure out which folder has certain files and which doesn't, you can use the diff command in the Terminal to find out fast.

While traditionally used to look at the difference between text files like this...

diff file-1 file-2...you can also compare the contents of two folders by adding -rq:

diff -rq folder-1 folder-2Once you enter this command—changing folder-1 and folder-2 to the folders you want to compare, of course—the terminal will spit out a list of differences between them. That's all there is to it!

Compare two folders' contents in Terminal | MacWorld


View the original article here

Monday, October 7, 2013

Generate a Monthly Calendar from the Command Line

Generate a Monthly Calendar from the Command Line

OS X and Linux: Need to quickly check calendar dates and don't have an app at the ready? You can generate calendar data for any month in an instant with a quick terminal command.

Just type this:

cal 10 2013In fact, you only need to type cal to generate a calendar for the current month. If you want a different month, however, just type cal and then the number of the month. If you want to specify a year other than the current year, type cal then the number of the month and then the year, all separated by a space. The result? A nicely formatted text-based calendar like the one you see pictured above.

5 Most Useful Terminal Command Utilities | Using Mac


View the original article here

Saturday, September 21, 2013

Delete Wi-Fi Networks in Windows 8 from the Command Line

Delete Wi-Fi Networks in Windows 8 from the Command Line

For reasons I can't fathom, Microsoft removed the ability to delete Wi-Fi networks from the network list if the network isn't in range. Manage Wireless Networks is also gone from the control panel. If you want to better manage Wi-Fi networks in Windows 8, you'll need to head to the command line.

As the screenshot above shows, Windows 8 does have a "Forget this network" option, but it doesn't appear if the network is not in range. To delete old profiles, you'll need to use the netsh command line utility. Raul Castillo writes on TechNet:

Open a run box window (or press win+R) then type cmd to open Windows 8 CLI.

To see stored wireless profiles, type:

netsh wlan show profiles

This will show a list of saved profiles of your connected WLAN devices. Then you'll need to write/save/memorize the profile name that you want to change.

To see the stored key (WPA/WEP/etc) of a specific profile:

netsh wlan show profiles name=[profile name] key=clear

You'll find the key content under security settings.

To delete a stored profile:

netsh wlan delete profile name=[profile name]

This will delete the stored profile of every WLAN interface. If you want to delete the profile of a specific WLAN interface, you need to use the following:

pre>netsh wlan delete profile name=[profile name] interface=[interface name]

To set network priority, Albert Xing contributes this command:

netsh wlan set profileorder name="network_name" interface="interface_name" priority=1The ability to delete network profiles whenever and wherever you are is especially important if there are any public networks you've connected to that are set to automatically reconnect when in range. As we've seen before, hackers love to masquerade as public Wi-Fi networks. If you want to automate the deletion of open Wi-Fi networks in Windows 8, Scott Hanselman has created WiFi.exe, a command line utility to do just that.

Windows 8 - Manage Wireless Networks? | Microsoft TechNet


View the original article here

Saturday, September 7, 2013

Wipe Out a Mistyped Terminal Command with Control + U

Wipe Out a Mistyped Terminal Command with Control + U

OS X (and Linux!): As much as we love the command line, because it can do so much more so much faster in many cases, you can make a mistake pretty easily. If you do, just wipe out everything you typed in an instant with a simple keyboard shortcut: Control+U.

When you press those keys, the entire line goes away. That is if you're at the end of the line, at least. If you move the cursor to the left, it'll only delete what's to the left and retain the text to the right. It's a simple thing, but when you make an error it saves a lot of time. If it didn't exist, you'd have to sit and press the delete key until every individual character disappeared.

6 Mac OS X Terminal Tips | Colmjude


View the original article here

Wednesday, September 4, 2013

Save the Output of Any Terminal Command with One Parameter

Save the Output of Any Terminal Command with One Parameter

Windows/Mac/Linux: The command line (or terminal) is an extremely useful tool, but if you have a command that returns a wall of text, you can save it to a single text file with this simple parameter.

By using a single parameter at the end of your normal commands, you can pipe the output directly into a basic text file. Just add "> FILENAME.txt" (no quotes) to the very end of your command. This will create a .txt file with everything you would have seen on the screen in an easy-to-copy form. So, if you wanted a list of all the files in your Movies directory, you would run the "dir" command with this parameter (for Windows users):

CD C:\Users\me\Movies
dir > mymovies.txtOpen up mymovies.txt, and you'll see a list of every file in that Movies folder.

If you want to put the file somewhere other than your working directory, you can spell out the location in it's entirety. For example:

dir > C:\Users\JimmyJoUserMan\Documents\heywhatsinhere.txtMany of you command line veterans are very familiar with this trick, but for those still learning their way around, it's a great shortcut to have on hand.

How to copy command prompt outputs to the Windows Clipboard | Ghacks