Tag Info

New answers tagged

0

ls | xargs It works for me, it's the simplest way I've found ever. Hope this helps you as well.


1

netmask supports automatically figuring out minimal sets of subnets for a particular IP range, which I find to be handy. For example: # netmask -c 10.32.0.0:10.255.255.255 10.32.0.0/11 10.64.0.0/10 10.128.0.0/9


0

I stumbled onto this page, when I was looking for a clamscan script. I followed above advice and got it working with: #!/usr/bin/bash # Create Hourly Cron Job With Clamscan # Directories to scan scan_dir="/home" # Temporary file list_file=$(mktemp -t clamscan.XXXXXX) || exit 1 # Location of log file log_file="/var/log/clamav/hourly_clamscan.log" # Make ...


0

If you were using xargs with find, use the -exec option of find instead: find . -name '*.log' -exec somecommand {} \;


2

Old question, but looks like you never found the answer. I had an old filter config from before I created some trunks. The filter rules contained ports that were now in the trunk groups, and this was causing trouble for the switch. Switch51(config)# show config ; J9773A Configuration Editor; Created on release #YA.15.12.0007 hostname "Switch51" trunk 23-24 ...


2

Since SVR1 and SVR2 are not part of the same AD domain, you will need to store credentials for SVR2 somewhere on SVR1 for your automated script to access. Using WinRM and sufficiently updated Powershell, Powershell Remoting will let you establish a connection from SVR1 to SVR2 and do whatever you can think of on a command line in an automatic fashion. You ...


1

I've tried this some time ago, and it seems that in this specific GP settings changes in the registry doesn't reflect in the console. I guess that's because there is also a file (C:\Windows\security\database\SecEdit.sdb) that holds the settings of the "Local Security Settings", and the mmc is using it instead of the registry. The manual values you put in ...


0

There are many methods to create hybrid scripts documented at http://www.dostips.com/forum/viewtopic.php?f=3&t=5543. I've listed a number of ways to create hybrid VBS/batch at http://stackoverflow.com/q/9074476/1012053. However, it is a bit easier to create hybrid JScript/batch, so I will present that solution here. Most hybrids execute the batch ...


2

In the script, create a temporary file and write the batch file into it. Then execute the script from the temporary file. Delete the temporary file when done. Ideally, write the temporary file to a location where other users can't access it because you have a potential race condition there that could be used to elevate permissions.


1

tar also has an "exclude" option you can add one or more times. For example: tar czvf documents.tgz --exlude dir1 --exclude dir2 * Note: I would rather create the tar in a different directory, to avoid including documents.tgz itself in tar in case you run the command another time without deleting it in the meantime.


2

It's because of the . in the output. . also gets tared. Use this intead, it will exclude both; . and dir1: find . -not -path '*dir1*' -not -path "." -exec tar -czvf documents.tgz '{}' \+ See the contents of documents.tgz: $ tar tf documents.tgz ./file2 ./file1 ./dir2/


1

The easiest way to provide your access keys to the Amazon EC2 CLI is to set the AWS_ACCESS_KEY and AWS_SECRET_KEY environment variables. First, add the following lines to ~/.bashrc and save the file. export AWS_ACCESS_KEY=your-aws-access-key-id export AWS_SECRET_KEY=your-aws-secret-key After you've updated ~/.bashrc, run the following command: source ...


2

No it does not. Systeminfo, when executed on a WIndows Server 2003 R2 system, reports the exact same thing as a Server 2003 Non-R2 system on the OS Name string. The version and build number are also the same.


2

Use "--filter": split --bytes=1024M --filter='gzip > $FILE.gz' /path/to/input /path/to/output


1

There are indeed some problems with the filters from CSV and any form XLS or even openOffice. Like the: Record separator: , Line terminator: \n or ; String definition: " or the like. If I get it correctly you want to do it on the command line within some scripts. This is exactly the same problem I have right now: from DATA in csv format, present it to the ...


6

yum info displays the RPM meta data which is included in every rpm package. Depending on the exact arguments and the fact whether or not the package is locally installed, installed or available from a repository, the meta data comes directly from the rpm database, the repository repodata or alternatively is read directly from a .rpm-file. When setting ...


0

Your packet trace reveals a bug in the IP stack on 192.168.1.5. The communication in summary: 192.168.1.5 -> 173.194.45.47 ICMP echo request 173.194.45.47 -> 192.168.1.5 ICMP echo reply 192.168.1.5 -> 173.194.45.47 ICMP error: I don't support ICMP This is not standards compliant. First of all ICMP is a mandatory part of IP, so not supporting ICMP is not ...



Top 50 recent answers are included