Find out whether a file is a symbolic link in PowerShell

Try this: function Test-ReparsePoint([string]$path) { $file = Get-Item $path -Force -ea SilentlyContinue return [bool]($file.Attributes -band [IO.FileAttributes]::ReparsePoint) } It is a pretty minimal implementation, but it should do the trick. Note that this doesn’t distinguish between a hard link and a symbolic link. Underneath, they both just take advantage of NTFS reparse points, IIRC.

Creating directory hard links in Mac OS X [duplicate]

I have bundled up the suggested answer in a Git repository if anybody is interested: https://github.com/selkhateeb/hardlink Once installed, create a hard link with: hln source destination I also noticed that unlink command does not work on Mac OS X v10.6 (Snow Leopard), so I added an option to unlink: hln -u destination To install Hardlink, use Homebrew and run: … Read more

Nginx sites-enabled, sites-available: Cannot create soft-link between config files in Ubuntu 12.04

You need to start by understanding that the target of a symlink is a pathname. And it can be absolute or relative to the directory which contains the symlink Assuming you have foo.conf in sites-available Try cd sites-enabled sudo ln -s ../sites-available/foo.conf . ls -l Now you will have a symlink in sites-enabled called foo.conf … Read more

Git and hard links

The ‘tree’ object, representing directories in Git, stores file name and (subset of) permissions. It doesn’t store inode number (or other kind of file id). Therefore hard links cannot be represented in git, at least not without third party tools such as metastore or git-cache-meta (and I am not sure if it is possible even … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)