Replace 10.0.0.0/8 with your largest local subnet. replace 10.1.1.123:3128 with your proxy information.. Note this only works with a proxy server configured for passive setup.. Now your firefox transparently proxy's stuff destined outside your network.. and Doesn't proxy stuff inside your network. as well as all your other favorite web applications. curl, wget, aria2 ect.
I can remember "cp -av" on Unix like systems to copy files and directories. The same can be done on Windows without extra software, somewhat.
The switches mean:
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/H Copies hidden and system files also.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/F Displays full source and destination file names while copying.
I don't type that all the time, I stick it into a file called "cpav.cmd" and run that.
echo xcopy /e/h/y /z/i /k /f %1 %2 > cpav.cmd
cpav zsh zsh2
http://support.microsoft.com/kb/323007
Show Sample Output
dd for windows is available from http://www.chrysocome.net/dd Tested with CD-ROMs like Linux install discs I don't know about DVD-ROMs.
In the Windows cmd.exe window, you can change the directory using cd, but if you need to go to a directory on another drive, you need to type in the drive letter and colon first (e.g. d:). With the /d on cd, you don't need this intermediate step.
cd /?
Tested on Windows XP
Show Sample Output
Sometimes I want to use the mouse to move/copy/delete files. (I also sometimes feel like a nut, sometimes I don't.) This is for Windows 2000 and later, probably. Tested on Windows XP, cmd.exe. http://support.microsoft.com/kb/130510 Show Sample Output
This works in bash and zsh.
You may also want to alias it, if you need to look at it often...
alias lpath="echo \$PATH | tr : \\\\n"
"\$PATH" to make sure to look at your current $PATH
Show Sample Output
On Windows 2000 or later, this command will give a listing of all the registered Windows services. You can then know what the name of a command is in order to start and stop it.
e.g.
sc start Apache2.2
or
net start Apache2.2
Please note that sc will allow the SERVICE_NAME only, while net will allow both SERVICE_NAME and DISPLAY_NAME.
Note that the space between the = and the next word are important. Not very unixy, that.
http://www.ss64.com/nt/sc.html
http://www.ss64.com/nt/net_service.html
http://technet.microsoft.com/en-us/library/bb490995.aspx
Show Sample Output
Useful for making a CLASSPATH out of a list of JAR files, for example. Also: export CLASSPATH=.:$(find ./lib -name '*.jar' -printf '%p:')
This command will first add an alias known only to git, which will allow you to pull a remote and first-forward the current branch. However, if the remote/branch and your branch have diverged, it will stop before actually trying to merge the two, so you can back out the changes. http://www.kernel.org/pub/software/scm/git/docs/git-pull.html Tested on git 1.5.6.1, msysgit (Windows port) Actually this is not really the way I want it. I want it to attempt a fast-foward, but not attempt to merge or change my working copy. Unfortunately git pull doesn't have that functionality (yet?). Show Sample Output
Great for little scripts that dig up obscure info that you are going to have to paste into another app anyway.
On Windows 2000 or newer, you can use the command line to save the current network interface info. You can then edit the text file and re-apply it using the netsh -f command (or netsh exec). Keep a bunch of text files around to quickly switch connection info without using extra software. http://en.wikipedia.org/wiki/Netsh http://support.microsoft.com/kb/242468 http://thelazyadmin.com/blogs/thelazyadmin/archive/2005/04/04/Using-Netsh-to-Manage-Network-Interfaces-Part-2.aspx Show Sample Output
displays time in seconds since January 1, 1970 UTC Show Sample Output
plays wave file after 3 minutes
If you are behind a proxy server and have to authenticate with proxy server to browser web pages then you have to pass proxy server address and its port number along with user credentials to curl to got GET the page using curl. Example : "curl -U srikanth -x 167.85.103.70:8080
with this command you can empty file Show Sample Output
Foward vnc securely from exampleserver.com Show Sample Output
Depends on GET. You can also replace GET with curl, or `wget -qO -` if GET isn't available.
add this alias in .bashrc to fast check the ip address of your modem router alias myip="curl -s http://myip.dk | grep '' | sed -e 's/]*>//g'" Show Sample Output
similar to perl chop()
Simply displays your current working directory. Helps when you are buried deep in /etc or some other obscure place. Show Sample Output
If somehow if you get more than 1 same name rpm package install, then it cannot be removed by using simple rpm -e as it gives you more than one rpm matches error. The --matches will help to remove all the same name rpm packages.
Once Enabled this command enables a trail of all processes on the system. As the name suggested auditing for Solaris machines. BSM creates a number of files in the /etc/security directory.
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: