X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 894913858413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1691840071; bh=bqnPJQmxitt0GJAjuWZf9s8lobiRpARFxg5QBt5S/qg=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Iv5QqRVdvdjKM71MGZlalD8Qjot2KqnEIlFOVn0wf9+AuykPfRJk9Cj+ZgQDwar7p 4HcHAHMBX5l7wCXOsAGFRSSHG4l8/oj+DWWD1xWLZHS6j6HS2CFptMFU/+k6/zS1D/ UZMWWFOqH7IZ1mpQcDZW3qUKFqVvGzJMNW1re5e8= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D26E3858D32 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691840054; x=1692444854; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DkQYGtIcGEfnBFRXafbw4A1ss46wsrXoOhHGT5Wf7p4=; b=Y74ZddFHebkzLgoyr9Hw6zNxKMIMIleXE7KpaUY/FM4Naw7Nvoot2rAoP/2V8ZTvHS mS/3SESX+HOP3h/7JKaIm7NkhgSmbCXxkl43mkjJF6cW2BRRzor6CJikqZ9/syNs8ntC mm7RwU7xALs/lr6nKCWw3WAG6Z7noRJvThAg6mfUUY4P12lGCbRQOlMKQSTAUqyBHY2Y svQiP2G2mH8ADF7Syc+yBhc3Y65DtqKQHCwF7keGW7/FZKYOwML7vFbOBQTX2APZTXJO 317FIJTpaHjCRUredJdmGhAGXaytyvaZD8wuWbL25ebrDxL3cOnvWnpLln33XXy5uXZt Hcnw== X-Gm-Message-State: AOJu0Yw6sq1nnJ8m6CWNxd5gYehdY9FNPgvz5d1gZuwFC7se9nqHUl11 1Syohug0VTxsJjHLoH8NtjZjNFpllvBL0hUWl0dhARg0ynKN1Hx9 X-Google-Smtp-Source: AGHT+IGdR6QTCqPKV4W9d5a+yLQtiACzpUIWv71pBxCoiSRApkQSkTniwmL1g5AX/C51aFNyJoEWFbVcivGfhwhd/hU= X-Received: by 2002:a05:6512:48cc:b0:4fb:7cea:882a with SMTP id er12-20020a05651248cc00b004fb7cea882amr2372402lfb.3.1691840053613; Sat, 12 Aug 2023 04:34:13 -0700 (PDT) MIME-Version: 1.0 References: <1b03c681-a144-5953-1d15-388029f19ba3 AT Shaw DOT ca> In-Reply-To: <1b03c681-a144-5953-1d15-388029f19ba3@Shaw.ca> Date: Sat, 12 Aug 2023 13:34:02 +0200 Message-ID: Subject: Re: lsof for Windows processes? To: cygwin AT cygwin DOT com X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Cedric Blancher via Cygwin Reply-To: Cedric Blancher Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Good afternoon! On Fri, 11 Aug 2023 at 18:21, Brian Inglis wrote: > > On 2023-08-11 09:45, Cedric Blancher via Cygwin wrote: > > Does Cygwin have a tool like lsof which can list which files or > > directories are in use by a Windows process? > > You can check these things yourself using the Cygwin Search Packages page: > > https://cygwin.com/packages/ > > type "usr/bin/lsof" and hit Enter: > > https://cygwin.com/cgi-bin2/package-grep.cgi?grep=usr%2Fbin%2Ffuser > > Search Results > > Found 0 matches for usr/bin/lsof > > and the same on the command line: > > $ cygcheck -p usr/bin/lsof > Found 0 matches for usr/bin/lsof > > but Cygwin does have fuser: > > $ cygcheck -p usr/bin/fuser > Found 6 matches for usr/bin/fuser > cygfuse-3.2.0-2 - cygfuse: Cygwin interface to Windows FUSE providers > cygfuse-3.2.0-3 - cygfuse: Cygwin interface to Windows FUSE providers > psmisc-debuginfo-22.20-1 - psmisc-debuginfo: Debug info for psmisc > psmisc-debuginfo-23.4-4 - psmisc-debuginfo: Debug info for psmisc > psmisc-22.20-1 - psmisc: Utilities for managing processes on your system > psmisc-23.4-4 - psmisc: Utilities for managing processes on your system > > and Windows has openfiles: > > $ cmd /c help openfiles > > OPENFILES /parameter [arguments] > > Description: > Enables an administrator to list or disconnect files and folders > that have been opened on a system. > > Parameter List: > /Disconnect Disconnects one or more open files. > > /Query Displays files opened locally or from shared > folders. > > /Local Enables / Disables the display of local open files. > > /? Displays this help message. > > Examples: > OPENFILES /Disconnect /? > OPENFILES /Query /? > OPENFILES /Local /? Thank you. But neither openfiles or fuser seem to work in this case, even if I have a file open in my bash shell, and call fuser in the same bash script: bash -c 'command exec {n} [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple