Delete .DS_STORE files in current folder and all subfolders from command line on Mac
find can do that. Just add -delete:
find can do that. Just add -delete:
You can effectively “empty” the Recycle Bin from the command line by permanently deleting the Recycle Bin directory on the drive that contains the system files. (In most cases, this will be the C: drive, but you shouldn’t hardcode that value because it won’t always be true. Instead, use the %systemdrive% environment variable.) The reason that this tactic works … Read more
On Windows, a good 3-way diff/merge tool remains kdiff3 (WinMerge, for now, is still 2-way based, pending WinMerge3) See “How do you merge in GIT on Windows?” and this config. Update 7 years later (Aug. 2018): Artur Kędzior mentions in the comments: If you guys happen to use Visual Studio (Community Edition is free), try the tool that is shipped with it: vsDiffMerge.exe. It’s … Read more
Quoting from man bash: -c string If the -c option is present, then commands are read from string.If there are arguments after the string, they are assigned to the positional parameters, starting with $0. The command quoted by you would append the text in heredoc (i.e. the text in VirtualHost tag) to the file /etc/apache2/sites-available/magento-store.com.
Try setting C_INCLUDE_PATH (for C header files) or CPLUS_INCLUDE_PATH (for C++ header files). As Ciro mentioned, CPATH will set the path for both C and C++ (and any other language). More details in GCC’s documentation.
Background: I am trying to write a [.bat] file so I can double click it and a bash script will get invoked. The bash script will start up a few windows GUI apps to monitor GPU/CPU temperatures. I just did a fresh install of cygwin v1.7.7-1 (downloaded today) and windows 7. Code: monitor-temps.bat: Code: monitor-temps.bash: … Read more
I resolved this issue in my centos machine by using command: It was about userName which was ec2-user in my case. Referenced From: AMAZONTroubleshooting
Finally I found the solution. Following is the solution:- Never use relative path in python scripts to be executed via crontab. I did something like this instead:-import os import sys import time, datetime CLASS_PATH = ‘/srv/www/live/mainapp/classes’ SETTINGS_PATH = ‘/srv/www/live/foodtrade’ sys.path.insert(0, CLASS_PATH) sys.path.insert(1,SETTINGS_PATH) import other_py_files Never supress the crontab code instead use mailserver and check the … Read more
You should be able to get dos2unix from your package manager on Linux. If you are using a Debian-based distro, you should be able to do sudo apt-get install dos2unix. If you are using a RH-like distro, you should be able to do sudo yum install dos2unix. Once it is installed, you can just give the target file as … Read more
Personally I use exit. The normal exit command simply terminates the current script, and the parent (for example if you were running a script from command line, or calling it from another batch file) exit /b is used to terminate the current script, but leaves the parent window/script/calling label open. With exit, you can also add an error level … Read more