Related Content
Explain Shell
If you are working on the Linux command line then sometimes you'll do a search to find out how to run a command that performs a task. I don't usually copy and paste commands in unless I can see what is going on, which used to mean spending time going through man pages and documentation trying to find out what this or that flag does.
Grep Context
Grep is a really powerful tool for finding things in files. I often use it to scan for plugins in the Drupal codebase or to scan through a CSV or log file for data.
For example, to scan for user centric ViewsFilter plugins in the Drupal core directory use this command (assuming you are relative to the core directory).
Overwriting Command Line Output With PHP
The other day I was trying to print some output to the command line and then overwrite the output afterwards. It turns out that there are a couple of ways to do this so I thought I would detail a few of them here.
Read Contents Of SSL Cert From The Command Line
Whilst it is possible to view the contents of an SSL cert from within most modern browsers I occasionally find the need to use the command line to find out the same information. I find this useful when renewing certificates as browsers can occasionally cache certificates for longer than expected, causing false results.
Using Custom Properties In Phing
Phing allows you to set up certain parameters that can be used throughout the rest of the script. These might be used to define a non standard build directory, or to store database connection details that can be written to the connection file during the build.
Set An IP Address From The Command Prompt In Windows
Rather than use the old connection properties dialog in Windows you can open up a command prompt and use the netsh to set up all sorts of network specific settings. The most useful part of this is that you can create a bat file that will allow you to quickly change your local IP address very quickly.
Comments
Its very informative and also very technical. I think I have to ask pc experts with this one.
Submitted by Andy on Sat, 03/12/2011 - 16:58
PermalinkHi philipnorton, I'm using Xcopy script for data backup, everything is good but my question is my data is appending day-by-day. I used /D command too but still some files are showing at destination after deleting at source. so please help me for this. My script is
> XCOPY "M:\FOLDER1" Z:\FOLDER2 /D /I /E /F /Y /H /R
Thanks in advance.
Submitted by Anonymous on Tue, 05/01/2012 - 13:24
PermalinkI think you probably need to add a deletion step in before you do the xcopy. I found that if I deleted any files on the source side they would still be in the destination side unless I specifically got rid of them.
My guess is that you are looking for a more sophisticated sync tool than xcopy ;)
Submitted by giHlZp8M8D on Tue, 05/01/2012 - 13:29
PermalinkSubmitted by Hana Moukalled on Mon, 11/11/2013 - 07:15
PermalinkSubmitted by alexrota1970 on Fri, 03/04/2016 - 10:26
PermalinkSubmitted by Coren on Thu, 09/14/2017 - 10:53
PermalinkSubmitted by george renee on Tue, 03/20/2018 - 20:12
PermalinkI used xcopy right up until my third heart attack.
Then I switched to GS RichCopy 360 Enterprise and now the tomatoes in my garden grow bigger than ever!
Submitted by Totally not a … on Fri, 08/24/2018 - 05:24
PermalinkAfter trying out several GUI-based tools the command line was simpler and faster. Thanks !
Submitted by Douglas Smith on Sat, 05/01/2021 - 15:29
Permalinkwrite the sync once and put it in a .bat file then run the BAT file through a Windows Schedular no need to remember anything or interact with it again unless you want to manually run it or stop it
Submitted by Terence Mothers on Tue, 05/24/2022 - 11:40
PermalinkAdd new comment