Tag Info

New answers tagged

1

As it turns out, the spaces in the file were actually two characters, 0xD0 0xA0 (Unicode? Maybe it's just a coincidence that those look like CR/LF left shifted 4 bits... They also appear as a single blank character, not two). A clue right off the bat was the error message - it should have only displayed the command, not the parameters, but there wasn't any ...


0

I assume the name of the directories is also the time stamp of their creation. If it is like that then you can use ls to list files according to the modification time of the directories. This will list the directories in the order of newest first cd /PATH/TO/PARENT-DIRECTORY/ ls -lt To delete all directories except the newest 2 files:- cd ...


1

try with $() instead of back quotes: VAL=$(eval echo \$arr$n)


2

The are two possibilities: jdk1.7 isn't an actual directory. jdk1.7 is a directory, but not an actual subdirectory of .. Consider the following example: $ mkdir a a/jdk $ touch a/jdk/somefile $ mkdir b c $ ln -s ../a/jdk b/ $ ln -s ../a c/ $ find -L | sort . ./a ./a/jdk ./a/jdk/somefile ./b ./b/jdk ./b/jdk/somefile ./c ./c/a ./c/a/jdk ./c/a/jdk/somefile ...


0

There's a cmdlet for that: Get-NetAdapter -Physical will give you information on your local interfaces. If you add the -CimSession parameter (Get-NetAdapter -Physical -CimSession), you can connect to a server by its ComputerName. You end up with: Get-NetAdapter -Physical -CimSession "ComputerName, ComputerName", where you can also fill ComputerName with a ...


1

Something like this should do it: # An array of server names $servers = 'comp1','comp2','comp3','comp4'; Get-WmiObject -computer $servers -class win32_networkadapter | Where-Object AdapterType -eq 'Ethernet 802.3' | Format-Table -auto __SERVER,Caption,ServiceName,AdapterType, MacAddress with the result being something like (MAC addresses ...


0

For most access denied errors there's usually a rights/permissions issue. First, I would retry your existing command with an elevated powershell instance. To elevate, right click on the powershell icon and choose run as administrator. If that fails, navigate to the location with your user account and verify that you have permissions (for the purpose of ...



Top 50 recent answers are included