Title: In Linux, Find Command Fails Even With Quoted and Escaped Asterisk · Issue #4680 · PowerShell/PowerShell · GitHub
Open Graph Title: In Linux, Find Command Fails Even With Quoted and Escaped Asterisk · Issue #4680 · PowerShell/PowerShell
X Title: In Linux, Find Command Fails Even With Quoted and Escaped Asterisk · Issue #4680 · PowerShell/PowerShell
Description: Steps to reproduce PS> touch ab.txt 'a b.txt' # Question mark character works PS> find -name 'a?.txt' ab.txt PS> find -name 'a??.txt' a b.txt # Asterisk appears to be being expanded into file names PS> find -name 'a*b.txt' /usr/bin/find:...
Open Graph Description: Steps to reproduce PS> touch ab.txt 'a b.txt' # Question mark character works PS> find -name 'a?.txt' ab.txt PS> find -name 'a??.txt' a b.txt # Asterisk appears to be being expanded into file names...
X Description: Steps to reproduce PS> touch ab.txt 'a b.txt' # Question mark character works PS> find -name 'a?.txt' ab.txt PS> find -name 'a??.txt' a b.txt # Asterisk appears to ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/4680
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"In Linux, Find Command Fails Even With Quoted and Escaped Asterisk","articleBody":"Steps to reproduce\r\n------------------\r\n\r\n```powershell\r\nPS> touch ab.txt 'a b.txt'\r\n\r\n# Question mark character works\r\n\r\nPS> find -name 'a?.txt'\r\nab.txt\r\n\r\nPS> find -name 'a??.txt'\r\na b.txt\r\n\r\n# Asterisk appears to be being expanded into file names\r\n\r\nPS> find -name 'a*b.txt'\r\n/usr/bin/find: paths must precede expression: ab.txt\r\nUsage: /usr/bin/find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec|time] [path...] [expression]\r\n\r\n# Escaping asterisk doesn't work\r\n\r\nPS> find -name 'a`*b.txt'\r\n# No output, which indicates the parameters were accepted, but the search produced no results.\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```powershell\r\nPS> find -name 'a*b.txt'\r\n./ab.txt\r\n./a b.txt\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```powershell\r\nPS> find -name 'a*b.txt'\r\n/usr/bin/find: paths must precede expression: ab.txt\r\nUsage: /usr/bin/find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec|time] [path...] [expression]\r\n```\r\nIt appears that the command is being converted into: find -name 'a b.txt' 'ab.txt'\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\nName Value \r\n---- ----- \r\nPSVersion 6.0.0-beta \r\nPSEdition Core \r\nGitCommitId v6.0.0-beta.6 \r\nOS Linux 4.4.0-92-generic #115-Ubuntu SMP Thu Au...\r\nPlatform Unix \r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} \r\nPSRemotingProtocolVersion 2.3 \r\nSerializationVersion 1.1.0.1 \r\nWSManStackVersion 3.0 \r\n```\r\n","author":{"url":"https://github.com/bigboy-pdb-spam","@type":"Person","name":"bigboy-pdb-spam"},"datePublished":"2017-08-27T02:47:45Z","url":"https://github.com/PowerShell/PowerShell/issues/4680"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d248b5cc-bd35-55e9-18b8-a81f6f8dae71 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF08:BB03C:10AFEC:178574:6AFD4D55 |
| html-safe-nonce | efd12c96d9ec84af1a4cccf21b3651279a977859317b3d26b7e8a2e56b85e8cb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjA4OkJCMDNDOjEwQUZFQzoxNzg1NzQ6NkFGRDRENTUiLCJ2aXNpdG9yX2lkIjoiODM1NDg2MDk0MDUxMTc1OTcwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 375d38c1d3c3d8f430729c612ab9871e06833ea75825d6c7320be1e6f1b67e60 |
| hovercard-subject-tag | issue:253137020 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/4680/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0216f71fed6268a8dd56e33e102b5b9bdff615260f04193bc21fba7a1bdf8757/PowerShell/PowerShell/issues/4680 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0216f71fed6268a8dd56e33e102b5b9bdff615260f04193bc21fba7a1bdf8757/PowerShell/PowerShell/issues/4680 |
| og:image:alt | Steps to reproduce PS> touch ab.txt 'a b.txt' # Question mark character works PS> find -name 'a?.txt' ab.txt PS> find -name 'a??.txt' a b.txt # Asterisk appears to be being expanded into file names... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bigboy-pdb-spam |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width