Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7760629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:56:25+00:00 2026-06-01T13:56:25+00:00

I am trying to list a directory on remote machine 10.31.236.56 I am using

  • 0

I am trying to list a directory on remote machine 10.31.236.56
I am using staf for it .the staf document says the command as

LIST   DIRECTORY <Name> [RECURSE] [LONG [DETAILS] | SUMMARY] [TYPE <Types>]
   [NAME <Pattern>] [EXT <Pattern>] [CASESENSITIVE | CASEINSENSITIVE]
   [SORTBYNAME | SORTBYSIZE | SORTBYMODTIME]   

so i am using it as

system("staf  10.31.236.56  FS LIST DIRECTORY  c:\\RMT\\Log ");

i get the result but when i try t match particular files like

 system("staf  10.31.236.56  FS LIST DIRECTORY  c:\\RMT\\Log  NAME  /latest*.*/");

i dont get any response can some one help me ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:56:27+00:00Added an answer on June 1, 2026 at 1:56 pm

    Most likely the shell is interpreting the wildcard before it gets passed on to STAF. I’d recommend putting all of the arguments to STAF in quotes so that the shell wouldn’t interfere.

    For best results, perhaps avoid using system(string) to launch the command, and instead use either qx{} or system(LIST) so that a subshell isn’t called.

    Perhaps something like this:

    my $cmd = "staf  10.31.236.56  FS LIST DIRECTORY  c:\\RMT\\Log  NAME  /latest*.*/";
    system(split ' ', $cmd);
    

    When you pass system a single string, it launches a shell, and passes that string as the command to execute. The shell, then, parses that string (including any wildcards), and runs the command. Since you don’t want this to happen (as you don’t want “latest*.*” to be parsed by the shell), you can pass system a list, which would tell it to just launch staf directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to get the list of files in my remote directory and
I'm trying to ssh into a remote machine, obtain a directory listing, assign it
trying to load in a bunch of images into a list from a directory...my
i am trying to traverse a given directory and create a list of files
Im trying to list all categories in a VPP-folder using a module from Meridium
I'm trying to list files in one particular directory and with one particular ip.
I'm trying to delete a directory that contains XML files from a remote computer.
I'm trying to take a directory and list its contents in a string array
I am trying to list the files inside the directory %TEMP% and %USERNAME% in
I'm trying to list all subdirectories in a directory. I wan't to show only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.