I am sourcing a file under tcsh. This file could be anywhere on the filesystem. How can I retrieve the path of my sourced file ?
$0 won't work : I don't execute the file, I source it.
Many thanks !
From the PowerShell prompt:
\Windows\system32\mspaint.exe
will run Paint. So will
Invoke-Expression -command "\Windows\system32\mspaint.exe"
but if there is a space in the path PowerShell spits the dummy e.g.
Invoke-Expression -command "\install\sub directory\test.bat"
Which complains:
The term '\install\sub' is not recognized as the name of a cmdlet, function, script file, or operable program.
What am I missing?
I have
'C:\Users\Documents...etc.......[file name.xlsx]Work Sheet'!$B:$F
in cell B1
i then want to run a vlookup formula to the above file but instead of
vlookup(A1,'C:\Users\Documents...etc.......[file name.xlsx]Work Sheet'!$B:$F,2,false)
I want to use the cell B1 for the path.
Reason is i want the master to look at multiple workbooks and i don't have time to sit and retype.
Please help
I'm trying to change the default install path in Windows 7 Pro x64. I'm in the Registry Editor and in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion key. I know I need to change ProgramFilesDir and ProgramFilesDir (x86).
What I'm not sure about is the CommonFilesDir, CommonFilesDir (x86) and the ProgramW6432Dir. Do I need to or should I change these values to reflect the new program files directory I'm using?
I tried Googling ProgramW6432Dir and didn't get much help.
I frequently have to do this. For example:
$ vim /etc/pam.d/sudo
$ vim /etc/pam.d/sudo-i
$ cd /etc/pam.d/ # Figure I should just go to the directory
Now, is there a way I could obtain the directory of the last argument when it's a file path?
I'm asking this cause I recently became aware of the $_ variable that has become useful. Was wondering if there's some other commandline fu that might come in handy.
I run a .ksh containing a awk call. awk.exe and his shortcut awk is in /bin/awk, /bin is in the PATH environment variable. But when I try to launch awk, I have this error message :
bash: /usr/bin/awk: no such file or directory
Why didn't bash look for it in the /bin folder too?
edit : tar has the same rights, tar.exe is in /bin and can be listed in /usr/bin/, the exact same way than awk. Tar works fine whereas awk not.
I'm attempting to run php-cgi under LightTPD on Windows with my doc_root set to one directory up (doc_root = "../Docs") -- however, I get "No input file specified".
I've set cgi.fix_pathinfo, and all the other tricks I could find with no success.
If I set doc_root to an absolute path, it works fine.
How can I make this work? If any additional information is required, I'll gladly provide it.
Thanks in advance.
I want to use rsnapshot to make backups of some folders on a remote server.
I've already setup Key Based Authentication, and I've specified in rsnapshot.conf:
snapshot_root [email protected]/
however I get the following error:
ERROR: snapshot_root snapshot_root
[email protected]/ - snapshot_root \
must be a full path
So I was wondering if the only way is to mount first the remote server and how (I'm on Ubuntu 9.04)
thanks
I run a .ksh containing a awk call. awk.exe and his shortcut awk is in /bin/awk, /bin is in the PATH environment variable. But when I try to launch awk, I have this error message :
bash: /usr/bin/awk: no such file or directory
Why didn't bash look for it in the /bin folder too?
edit : tar has the same rights, tar.exe is in /bin and can be listed in /usr/bin/, the exact same way than awk. Tar works fine whereas awk not.
I am doing one racing game,in which I used iTween path systems to smooth camera turning in turns,iTween path systems works fine(special thanks to Bob Berkebile) Here first I used one cube to follow path and it works fine in turning But my problem is instead of using cube I used FBX(character) to follow path here when turn comes character will not move This is my problem Image:
I want this type:
How to Slove this problem?
I am installing a proprietary CAD application (MEDUSA4 personal) and the installer wants to know the path to my web browser (as a prerequisite for online help). I have the default firefox installation and chromium, but I don't know the installation path for any of them, and couldn't find them among the usual suspects (/usr/bin, /usr/lib).
It would be nice if you could tell me the path to one of them, and even nicer if you can tell me how to find out the installation path to any package managed by apt.
I have to set up a software raid (level1) on a Ubuntu server 12.04. It should serve files in the network via Samba. The server has the following disks:
250gb Sata hdd (Ubuntu is installed on that drive)
2 TB Sata hdd (first disk in raid array, data disk)
2 TB Sata hdd (second data disk)
I created one partition on every data disk with the type Linux raid autodetect. In the second step I created the raid1 with the following command:
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
After that, I added the array to the mdconf:
mdadm --examine --scan >> /etc/mdadm/mdadm.conf
The problem is: After a reboot the array is not available on the path /dev/md0. Instead of that it gets reassembled as /dev/md/0 but it is not very reliable. Has anybody a solution for this issue?
The Scenario
I have an application where we took the good old query string URL structure:
?x=1&y=2&z=3&a=4&b=5&c=6
and changed it into a path structure:
/x/1/y/2/z/3/a/4/b/5/c/6
We're using ASP.NET MVC and (naturally) ASP.NET routing.
The Problem
The problem is that our parameters are dynamic, and there is (theoretically) no limit to the amount of parameters that we need to accommodate for.
This is all fine until we got hit by the following train:
HTTP Error 400.0 - Bad Request
ASP.NET detected invalid characters in the URL.
IIS would throw this error when our URL got past a certain length.
The Nitty Gritty
Here's what we found out:
This is not an IIS problem
IIS does have a max path length limit, but the above error is not this.
Learn dot iis dot net
How to Use Request Filtering
Section "Filter Based on Request Limits"
If the path was too long for IIS, it would throw a 404.14, not a 400.0.
Besides, the IIS max path (and query) length are configurable:
<requestLimits
maxAllowedContentLength="30000000"
maxUrl="260"
maxQueryString="25"
/>
This is an ASP.NET Problem
After some poking around:
IIS Forums
Thread: ASP.NET 2.0 maximum URL length?
http://forums.iis.net/t/1105360.aspx
it turns out that this is an ASP.NET (well, .NET really) problem.
The shit of the matter is that, as far as I can tell, ASP.NET cannot handle paths longer than 260 characters.
The nail in the coffin in that this is confirmed by Phil the Haack himself:
Stack Overflow
ASP.NET url MAX_PATH limit
Question ID 265251
The Question
So what's the question?
The question is, how big of a limitation is this?
For my app, it's a deal killer. For most apps, it's probably a non-issue.
What about disclosure? No where where ASP.NET Routing is mentioned have I ever heard a peep about this limitation. The fact that ASP.NET MVC uses ASP.NET routing makes the impact of this even bigger.
What do you think?
I have a folder called lib. In that folder are some files. I want to obtain all the names of the files that end in .jar, and concatenate them into a line, separated by spaces. I don't want the path name at all.
I've tried this:
ls lib/*.jar | xargs
and the output is
lib/file1.jar lib/file2.jar
But what I'm trying to get is
file1.jar file2.jar
How can I do this?
I've also tried find but I get the same problem
find lib -name *.jar | xargs
Hello all, is it possible to have a configuration in a Windows 2003 SBS environment where in the event that the SBS box crashed/turned off/ or is being worked on that there can still exist a path to the internet for domain users and visitors to still use?
I would like to have the standalone router issue DHCP IPs. The primary DNS would point to the SBS, the secondary wouuld point to the ISP DNS Server.
My theory was that if someone was using the internet and the SBS box went down they wouldn't be able to access the network shares but still be able to use the internet. (We are moving everything into the clouds with Google Apps Non-Profit)
Does this seem like a reasonable configuration? Or are they're pitfalls that I will fall into?
Thanks
Mark
I wrote a recursive function, which returns an array with the paths to all files/folders in a given path. An array is already sorted and returns the exact information i want, but i struggle to display it properly in html lists.
Array_of_paths = (
[0] => /path/to/folderA/
[1] => /path/to/folderA/subfolderAA/
[2] => /path/to/folderB/
[3] => /path/to/folderB/subfolderBB/
[4] => /path/to/folderB/subfolderBB/fileBB.txt
[5] => /path/to/folderB/fileB.txt
[6] => /path/to/folderC/
...
)
I want to put these paths in <ul>,<li> tags to see something like this:
<ul>
<li>/path/to/folderA/
<ul>
<li>/path/to/folderA/folderAA/</li>
</ul>
</li>
<li>/path/to/folderB
<ul>
<li>/path/to/folderB/subfolderBB/
<ul>
<li>/path/to/folderB/subfolderBB/fileBB.txt</li>
</ul>
</li>
<li>/path/to/folderB/fileB.txt</li>
</ul>
</li>
<li>/path/to/folderC/</li>
</ul>
=
/path/to/folderA/
/path/to/folderA/folderAA/
/path/to/folderB
/path/to/folderB/subfolderBB/
/path/to/folderB/subfolderBB/fileBB.txt
/path/to/folderB/fileB.txt
/path/to/folderC/
I managed to find a couple of similars questions, but the answers were in Ruby language. So, what's the problem solving idea behind this?
i'm trying to get the list of mime types known to an IIS server (which you can see was asked and and answered by me 2 years ago). The copy-pasted answer involves:
GetObject("IIS://LocalHost/MimeMap") msdn
GetObject("IIS://localhost/mimemap") KB246068
GetObject("IIS://localhost/MimeMap") Scott Hanselman's Blog
new DirectoryEntry("IIS://Localhost/MimeMap")) Stack Overflow
new DirectoryEntry("IIS://Localhost/MimeMap")) Stack Overflow
New DirectoryServices.DirectoryEntry("IIS://localhost/MimeMap") Velocity Reviews
You get the idea. Everyone agrees that you use a magical path iis://localhost/mimemap. And this works great, except for the times when it doesn't.
The only clue i can find as to why it fails, is from an IIS MVP, Chris Crowe's, blog:
string ServerName = "LocalHost";
string MetabasePath = "IIS://" + ServerName + "/MimeMap";
// Note: This could also be something like
// string MetabasePath = "IIS://" + ServerName + "/w3svc/1/root";
DirectoryEntry MimeMap = new DirectoryEntry(MetabasePath);
There are two clues here:
He calls iis://localhost/mimemap the Metabase Path. Which sounds to me like it is some sort of "path" to a "metabase".
He says that the path to the metabase could be something else; and he gives an example of what it could be like.
Right now i, and the entire planet, are hardcoding the "MetabasePath" as
iis://localhost/MimeMap
What should it really be? What should the code be doing to construct a valid MetabasePath?
Note: i'm not getting an access denied error, the error is the same when you have an invalid MetabasePath, e.g. iis://localhost/SoTiredOfThis
Many of our users have their Home folder set as Available Offline. Their Windows 7 laptops will not be back on our network for a few weeks. In the mean time, we're setting up new servers and reorganizing our files, so the network path to the Home folder is going to be completely different.
Based on some testing I did, when the users return, any files they've created or modified while offline will be gone, and the new Home folder will be there and not set to sync. The offline cache of the old Home folder is still accessible through the Sync Center, but they're not going to want to dig through that and try to find what's missing. Avoiding this would involve keeping the old server around and moving everyone to the new location in person, so we know for sure they're synced first.
Is there any way to avoid this that isn't as tedious, like a quick registry edit or something that will point the old offline cache to the new location?
We're looking into implementing Variable Envelope Return Path (VERP) for improved bounce processing for our application.
Our current mail infrastructure is MS Exchange 2007 but are in the process of upgrading to 2010. We're also implementing Postini for spam filtering.
Exchange doesn't support sub-addressing (see also this question on disposable addresses) -- and VERP is somewhat of a specialized application of sub-addressing.
Are there any options for implementing VERP in Exchange without putting another non-Exchange SMTP relay in front of Exchange to pre-process incoming messages? Specifically could a transport rule be created that could match against the target (non-existing) recipient, store that recipient address in a special header added to the message, and redirect the message to a pre-created mailbox?
Note: we have developer resources available if custom code could be used somehow.
I recently attended an R training course and was happily working with a laptop in RStudio. On my return to the office I installed RStudio and I tried to run some scripts I had gathered from the course. However, these scripts required me to install packages and when I tried to install the packages the result was an error.
Error in install.packages : path[1]="\file/users/bernard/R/win-library/2.15": Access is denied
In my firm we write to a server drive refferred to as the U: drive rather than the hard disk on the desktop for security reasons. Any ideas what is going on?
I have checked the properties of the folder in windows and it says I have permission but still it fails. I have tried creating a folder on the C drive and directing R_LIBS_USER to it but no luck.
On Linux, if I've cd'd around and am now in a directory, is there a way to figure out what the real path to that directory is if I had not used a symbolic link to get there?
Consider:
$ pwd
/home/dave/tmp
$ mkdir -p 1/2/3/4/5
$ ln -s 1/2/3/4/5 5
$ cd 5
$ pwd
/home/dave/tmp/5
Or:
$ pwd
/home/dave/tmp
$ mkdir -p 1/2/3/4/5
$ ln -s 1/2/3/4 4
$ cd 4/5
$ pwd
/home/dave/tmp/4/5
Is there any way to figure out that /home/dave/tmp/5 is really /home/dave/1/2/3/4/5 ?
So I have an Amazon EC2 box running Windows Server 2008 with Active Directory installed on it. I also have a Windows 7 virtual machine, which is set to use the Active Directory box as its DNS and WINS server. I'm trying to join the virtual machine to the domain, and I'm asked for authentication. I give authentication, wait a minute, and I get an error saying:
The following error occurred attempting to join the domain "ad.chigs.me":
The network path was not found.
How can I fix this so that I'll be able to join the domain?
A simple question, but I have no concrete documentation to confirm my answer. When installing software with the make install command under a unix machine, the default path is going over to /usr/local/bin. I would like to update a package system-wide under /usr/bin. How (and where) do I change the command under make or make install to /usr/bin?
Also - Can the package remain on /usr/local/bin but the systemwide usage of Python (the update being installed) be changed to /usr/local/bin from /usr/bin to avoid modifying the original installed version ?