Search Results

Search found 17867 results on 715 pages for 'delete row'.

Page 59/715 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • Unable to delete a file using bash script

    - by user3719091
    I'm having problems removing a file in a bash script. I saw the other post with the same problem but none of those solutions solved my problem. The bash script is an OP5 surveillance check and it calls an Expect process that saves a temporary file to the local drive which the bash script reads from. Once it has read the file and checked its status I would like to remove the temporary file. I'm pretty new to scripting so my script may not be as optimal as it can be. Either way it does the job except removing the file once it's done. I will post the entire code below: #!/bin/bash #GET FLAGS while getopts H:c:w: option do case "${option}" in H) HOSTADDRESS=${OPTARG};; c) CRITICAL=${OPTARG};; w) WARNING=${OPTARG};; esac done ./expect.vpn.check.sh $HOSTADDRESS #VARIABLES VPNCount=$(grep -o '[0-9]\+' $HOSTADDRESS.op5.vpn.results) # Check if the temporary results file exists if [ -f $HOSTADDRESS.op5.vpn.results ] then # If the file exist, Print "File Found" message echo Temporary results file exist. Analyze results. else # If the file does NOT exist, print "File NOT Found" message and send message to OP5 echo Temporary results file does NOT exist. Unable to analyze. # Exit with status Critical (exit code 2) exit 2 fi if [[ "$VPNCount" > $CRITICAL ]] then # If the amount of tunnels exceeds the critical threshold, echo out a warning message and current threshold and send warning to OP5 echo "The amount of VPN tunnels exceeds the critical threshold - ($VPNCount)" # Exit with status Critical (exit code 2) exit 2 elif [[ "$VPNCount" > $WARNING ]] then # If the amount of tunnels exceeds the warning threshold, echo out a warning message and current threshold and send warning to OP5 echo "The amount of VPN tunnels exceeds the warning threshold - ($VPNCount)" # Exit with status Warning (exit code 1) exit 1 else # The amount of tunnels do not exceed the warning threshold. # Print an OK message echo OK - $VPNCount # Exit with status OK exit 0 fi #Clean up temporary files. rm -f $HOSTADDRESS.op5.vpn.results I have tried the following solutions: Create a separate variable called TempFile that specifies the file. And specify that in the rm command. I tried creating another if statement similar to the one I use to verify that file exist and then rm the filename. I tried adding the complete name of the file (no variables, just plain text of the file) I can: Remove the file using the full name in both a separate script and directly in the CLI. Is there something in my script that locks the file that prevents me from removing it? I'm not sure what to try next. Thanks in advance!

    Read the article

  • Delete until previous punctuation mark in Bash

    - by hekevintran
    In Bash, Ctrl + W will erase the last word. Bash considers words to be delimited by spaces. This means that if the cursor is at the end of the string "cd /dir1/dir2/dir3" and you hit Ctrl + W you will be left with "cd ". Is there a Bash shortcut (custom defined is okay) that will leave me with "cd /dir1/dir2/"?

    Read the article

  • Cannot delete old NFS directory: Device or resource busy

    - by Jakobud
    On server1, we had an NFS share mounted from server 2 like this: /nfs/server2/share Recently, we took down server2 to install a new OS on it. Now we can't get NFS setup the way it was. When I do this: ls -l /nfs I get this: drwxr-xr-x 2 root root 0 2010-03-15 09:59 server2 Notice how the directory size is 0 instead of 4096 like usual? Anyways I go into server2 expecting to see a share directory, but I don't. It's empty. So therefore I cannot mount my share at /nfs/server2/share. When I try to create /nfs/server2/share directory, I get mkdir: cannot create directory `share': No such file or directory I think this is because it doesn't really think the /nfs/server2 directory really exists. Even if I use the -p option with mkdir, it doesn't work. Next I tried to remove /nfs/server2 so I could just recreate it. I try to rm -r /nfs/server2 but I get rm: cannot remove directory `/nfs/server2': Device or resource busy So now I'm at a loss. I need to mount this NFS share in the same exact place on server1 (at /nfs/server2/share) because other software on server1 depend on this. But if I can't create that share directory and I can't remove that directory, what do I do? Also, just for testing, I attempted to mount the share at /nfs/testing/share and it mounted just fine. But like I said, I need to mount it back in the same location.

    Read the article

  • Virtualmin "Command to run after making changes to a server" differentiate between add/edit/delete

    - by Josh
    I'm using Virtualmin, and I have a command set up under Virtualmin Module Config Actions Upon Server and user creation Command to run after making changes to a server This command is designed to perform a few additional steps after the account is set up. However, the action is called every time the account is modified, and also gets called when the account is deleted. The actions it performs should only be done when the account is first created. How can my custom command know which action is being performed? Is there an environment variable which determines if the action is creation, alteration, or deletion?

    Read the article

  • SQL Server 2005 jobs running twice in a row - using LiteSpeed

    - by Malnizzle
    Howdy! I have a SQL server (2005) backing up to a network share, who has a group of maintenance plans setup through LiteSpeed to backup different DBs. They were just set up to run two sub plans on different schedules for full/diff backups and did that just fine for a couple of months. Then I added "Clean Up" task to the subplans. Ever since that point, the backup creates another bak right after the first bak job is completed. I removed the clean up item from the subplan, and it still creates two baks when ran. Both the SQL Activity Monitor and the machine's windows application log show just one job being executed. I did this same thing to a couple of other servers backing up to the same location, and they are behaving correctly. Thoughts?

    Read the article

  • NTPD seems to delete all network interfaces

    - by Aurelin
    We have a couple of virtual interfaces configured on eth0 on a CentOS, and every now and then, they went down seemingly out of the blue. Now after going through the log files, I found out that apparently ntpd deletes all eth0 interfaces, and that dhclient automatically brings eth0 back up. The virtual interfaces, however, stay down which causes several of our websites to be inaccessible. Can someone explain to me why ntpd deletes interfaces? Can / should that be turned off, or can / should I configure dhclient to bring the virtual interfaces back up automatically, too? EDIT// The log files that I should've posted : Nov 12 13:10:28 raptor dhclient[20048]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x6a825e97) Nov 12 13:10:42 raptor dhclient[20048]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x24554092) Nov 12 13:10:42 raptor dhclient[20048]: DHCPOFFER from 96.126.108.78 Nov 12 13:10:42 raptor dhclient[20048]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x24554092) Nov 12 13:10:42 raptor dhclient[20048]: DHCPACK from 96.126.108.78 (xid=0x24554092) Nov 12 13:10:42 raptor ntpd[2109]: Deleting interface #31 eth0, 50.116.50.97#123, interface stats: received=3255, sent=3256, dropped=0, active_time=1559394 secs Nov 12 13:10:42 raptor ntpd[2109]: Deleting interface #32 eth0:0, 50.116.53.56#123, interface stats: received=3, sent=0, dropped=0, active_time=1559391 secs Nov 12 13:10:42 raptor ntpd[2109]: Deleting interface #33 eth0:1, 66.175.211.192#123, interface stats: received=2, sent=0, dropped=0, active_time=1559389 secs Nov 12 13:10:42 raptor ntpd[2109]: Deleting interface #34 eth0:2, 50.116.53.95#123, interface stats: received=3, sent=0, dropped=0, active_time=1559387 secs Nov 12 13:10:42 raptor ntpd[2109]: Deleting interface #35 eth0:3, 97.107.132.32#123, interface stats: received=2, sent=0, dropped=0, active_time=1559385 secs Nov 12 13:10:42 raptor ntpd[2109]: Deleting interface #36 eth0:4, 50.116.56.201#123, interface stats: received=2, sent=0, dropped=0, active_time=1559383 secs Nov 12 13:10:42 raptor ntpd[2109]: Deleting interface #37 eth0:5, 66.175.212.121#123, interface stats: received=2, sent=0, dropped=0, active_time=1559381 secs Nov 12 13:10:42 raptor ntpd[2109]: Deleting interface #38 eth0:6, 66.175.215.137#123, interface stats: received=2, sent=0, dropped=0, active_time=1559379 secs Nov 12 13:10:44 raptor NET[1573]: /sbin/dhclient-script : updated /etc/resolv.conf Nov 12 13:10:44 raptor dhclient[20048]: bound to 50.116.50.97 -- renewal in 32692 seconds. Nov 12 13:10:45 raptor ntpd[2109]: Listening on interface #39 eth0, 50.116.50.97#123 Enabled The eth0 config : DEVICE="eth0" ONBOOT="yes" BOOTPROTO="dhcp" IPV6INIT="no" IPADDR=50.116.50.97 NETMASK=255.255.255.0 GATEWAY=50.116.50.1 And the virtual interfaces (I posted the first one only, they look the same for the most part) : # Configuration for eth0:0 DEVICE=eth0:0 BOOTPROTO=none # This line ensures that the interface will be brought up during boot. ONBOOT=yes # eth0:0 IPADDR=50.116.53.56 NETMASK=255.255.255.0

    Read the article

  • How to delete Chrome temp data (history, cookies, cache) using command line

    - by Dio Phung
    On Windows 7, I tried running this script but still cannot clear Chrome temp data. Can someone figure out what's wrong with the script? Where do Chrome store history and cache ? Thanks ECHO -------------------------------------- ECHO **** Clearing Chrome cache taskkill /F /IM "chrome.exe">nul 2>&1 set ChromeDataDir=C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default set ChromeCache=%ChromeDataDir%\Cache>nul 2>&1 del /q /s /f "%ChromeCache%\*.*">nul 2>&1 del /q /f "%ChromeDataDir%\*Cookies*.*">nul 2>&1 del /q /f "%ChromeDataDir%\*History*.*">nul 2>&1 set ChromeDataDir=C:\Users\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Default set ChromeCache=%ChromeDataDir%\Cache>nul 2>&1 del /q /s /f "%ChromeCache%\*.*">nul 2>&1 del /q /f "%ChromeDataDir%\*Cookies*.*">nul 2>&1 del /q /f "%ChromeDataDir%\*History*.*">nul 2>&1 ECHO **** Clearing Chrome cache DONE

    Read the article

  • rm failing inside cron script

    - by Nicholas
    I have a cron job calling a bash script which runs fine, except for one line inside it that is suppose to remove all fines in a directory. The result of this line is always 'no such file or directory' even though I have verified (many times) that there are files in that directory. The line in question is as simply: rm /dir1/dir2/dir3/* The script works fine when run manually in the terminal, so it must be something about how the cron is run. I've tried giving 'dir3' and all the files inside it every permission possible, so it shouldn't be a permission problem. (The directory and files are also owned by the user). I've tried specifing 'SHELL=/bin/bash' inside 'crontab'. There is no sticky bit set and there is no alias on the rm command. Interestingly changing the 'rm' command to 'ls' gives the same negative result (unless you remove the trailing '*', and then that works). What am I missing here?

    Read the article

  • OpenFiler cannot delete volume group

    - by Harun Baris Bulut
    I have deleted all the ingredients of a volume group even access options, but it still says that the Volume Group is in use. I tried to close everything including the OpenFiler itself but when I open it, it still says the volume is in use. How can I overcome this problem ? Thanks

    Read the article

  • Programmatically add/delete users in Exchange

    - by Terry Gamble
    I've got the following set up: ASP.Net site that allows my internal employees to add in new hire information (no secure data, just stuff like name/address/phone) and when they submit this it goes into a database (SQL). Every few minutes a service runs that checks the database and if there are new entries it will add them into Exchange. The issue is I'm not happy with the way the service is doing things, (It's not putting address, etc in it). As I don't have the source code this I'm thinking of recreating it. My issue though is finding a starting point even. I know I'll have to create the scripts through code where the data is retrieved from SQL : Joe Smith 123 Main Street Nowhere, USA 19999 And put that into a powershell cmdlet (not sure exactly the syntax but I can get that figured out unless someone already has it) where the user is created in the Active Directory as a normal user and the mailbox is created simultaneously. From there I just need to fill out fields in Active Directory with the person's address, etc. Finally a deletion routine for when we terminate someone, however I'm sure that it will simply be a cmdlet that is easily shelled out to much like the initial one is, once I can figure out how to start that... Anyone have some good reference points or have already done it and can share?

    Read the article

  • Excel: count number of unique/distinct row in range with condition

    - by Bertvan
    I have a an excel sheet with: in Col A: week numbers in Col B: dates (timesheet entries) I need to know the number of days worked for each week, so I need to the number of unique date entries per week number. I found formula's (both array as non-array) that handle this for a fixed range, but I want to have the results in another column per week number. So, the result of the added dataset below would be (the colon is just for clarity): 14: 2 15: 3 17: 6 20: 2 21: 3 If this is the source data: 14: 4/04/2012 14: 4/04/2012 15: 10/04/2012 15: 10/04/2012 15: 11/04/2012 17: 26/04/2012 17: 26/04/2012 17: 26/04/2012 17: 26/04/2012 17: 27/04/2012 17: 27/04/2012 20: 14/05/2012 20: 14/05/2012 21: 23/05/2012 21: 23/05/2012 21: 25/05/2012

    Read the article

  • What can I delete after moving MySQL database files location

    - by kopeklan
    I'm trying to move the location of database files from /var/lib/mysql to /home/lib/mysql I only changing database files. Socket is still /var/lib/mysql/mysql.sock (only changing datadir in my.cnf) Now, all data in /var/lib/mysql has been copied to /home/lib/mysql MySQL has been started and everything is fine. Now time to cleaning up data in /var/lib/mysql but I'm not sure what data can and cannot be removed in /var/lib/mysql this is data (except database name) in /var/lib/mysql: ibdata1 ib_logfile0 ib_logfile1 mysql

    Read the article

  • How to delete system default printer forms?

    - by matt wilkie
    On Windows there are system default printer forms which can't be deleted from the Print Server Properties dialog. Is there some other way they can be removed? We are never going to use page sizes like Envelope, B5(JIS), US Std Fanfold, etc. and I'd like to save users (and myself!) from having to scroll through a big long list of noise. Our print servers are Windows Server 2003 if that makes any difference. thanks.

    Read the article

  • Handle Sysinternals software does not accept -c parameter

    - by Alex
    I am trying to close a handle to a locked file in Windows, using Sysinternals Handle software (http://technet.microsoft.com/en-us/sysinternals/bb896655). First I search for opened handle: handle.exe "C:\Temp" It issues me the following: Far.exe pid: 1144 type: File 2E8: C:\Temp Far.exe pid: 1144 type: File 3A8: C:\Temp Next I run handle.exe with -c parameter. However, whichever number I enter, it does not do anything. I have tried both: 1144, 2E8, 3A8 and 1144 in hex (478) as the software help says it accepts PID in hexademic. Whatever I enter, it just issues the following: Handle v3.46 Copyright (C) 1997-2011 Mark Russinovich Sysinternals - www.sysinternals.com usage: handle [[-a [-l]] [-u] | [-c <handle> [-y]] | [-s]] [-p <process>|<pid>] [name] -a Dump all handle information. -l Just show pagefile-backed section handles. -c Closes the specified handle (interpreted as a hexadecimal number). You must specify the process by its PID. WARNING: Closing handles can cause application or system instability. -y Don't prompt for close handle confirmation. -s Print count of each type of handle open. -u Show the owning user name when searching for handles. -p Dump handles belonging to process (partial name accepted). name Search for handles to objects with <name> (fragment accepted). No arguments will dump all file references. What am I doing wrong?

    Read the article

  • Can't Delete file Macbook Pro (Stuck in Trash)

    - by chris
    I dunno when I deleted this file (its an avi), its been in the trash for awhile. Today I went to empty the trash and this one file can't claims to be in use. But I have restarted, shut down my mac several times, I've also used my media player several times since last using that file. So I guess Im trying to find out how to find whats using the file or at least making it appear as such. So I can go about deleting it finally.

    Read the article

  • OSX Time Machine: deletion of backup folders

    - by jml
    I saw this question and was hoping that someone could expand upon the chosen answer (which I understood): Can you sudo mv Time Machine backup files as sudo from the trash to their original locations? I have tried doing this as root to no avail (operation not permitted). If not, can you successfully rm them via the trash via the terminal, faster than what the endless 'preparing to empty the trash' dialog suggests, and If you get the files back out of the trash can you tell if they are intact via disk utility (and how) Can you force indexing on a Time Machine drive in the same way that you would a normal drive to rebuild the TM index? I realize that a single answer could clarify all of the above, but I wanted to include details to be clear on what I am asking. Thanks for any help.

    Read the article

  • Formatted C: from Windows 7 setup, now it won't even install

    - by ocurro
    Help, I'm so confused. I did more or less what's been described here: I formatted Vista and installed Windows 7 over it. Problem is that I'm now unable to boot (...) [1] I'm installing Seven on top of Vista on ACER AS1410 Notebook When it comes to the part where I choose where to install, I pick the partition labeled C: but instead of keeping windows.old files (what would I want them for?) I choose to go and carelessly format the partition (my bad). It shows me this error: Setup was unable to create a new system partition or locate an existing system partition. See the Setup log files for more information Now the only option is "Load Driver". i have tried installing every single one from ACER website, none of them are useful. I even flashed orig. BIOS. I've tried going back and choose "Repair" like in the picture:[2] but I only get an error: "Failed to save startup options" I think this is weird, what else can I do? [1] superuser.com/questions/117076/formatting-of-an-xp-vista-dual-boot-machine-now-unable-to-boot-up-xp [2] www.howtogeek.com/wp-content/uploads/2007/08/image51.png

    Read the article

  • How do I delete a route in OS X 10.5

    - by authormichael-olsen-craig
    I somehow configured my Mac to route all requests for a particular IP Name (sample.com) to the loopback address (127.0.0.1). Now I'm trying to remove this, but can't determine where to do it. There is no entry for it under /etc/hosts. The routing table shows that it is mapping the IP Name to the IP address of the Mac. Routing table output below: Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.2.1 UGSc 4 1 en0 127 sample.com UCS 0 0 lo0 sample.com sample.com UH 1 7093 lo0 169.254 link#4 UCS 0 0 en0 192.168.2 link#4 UCS 6 0 en0 192.168.2.1 0:11:22:22:3f:fa UHLW 20 55565 en0 1070 192.168.2.15 tsema.org UHS 0 9 lo0 192.168.2.255 link#4 UHLWb 4 84777 en0 Any help would be greatly appreciated!

    Read the article

  • Zero'ing out deleted files

    - by Bozojoe
    I want to minimize the amount of space my virtual disk is using, by zero'ing out the data on any deleted files. The virtual disk is a VDMK running ubuntu on VirtualBox. What is the best way to find any deleted files, and zero them out, so that when I export the appliance the disk size is only existing files on the disk?

    Read the article

  • Send Ctrl+Alt+Del over VNC with Vista and UAC off?

    - by jasonh
    I'm trying to set up a machine here with Ultra VNC on Vista with UAC off. Problem is, in this configuration, I can't send Ctrl+Alt+Del to the Vista machine and so I'm stuck at the login screen, which is waiting for the CAD sequence. I'm joined to a domain, so I don't think I can disable the CAD requirement. I can't re-enable UAC either. I also tried using the on-screen keyboard, but it didn't seem to work. Any workaround or solution?

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >