Is "stat: illegal option -- -" an issue with hyphenated filename or flag problem?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Is "stat: illegal option -- -" an issue with hyphenated filename or flag problem?
# 1  
Old 01-22-2015
Is "stat: illegal option -- -" an issue with hyphenated filename or flag problem?

Hi.

I'm trying to install VMWare Workstation to run a virtual machine on my Mac OS, but running the bundle from bash(xterm)

Code:
sh VMware-workstation-Full-11.0.0-2305329.x86_64.bundle

(as suggested in install guide)

comes up with error:
Code:
stat: illegal option -- -
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]

Digging around, I can't tell if the hyphens in the bundle name are an issue (seems strange), or something else.

Any clues?

Last edited by rbatte1; 01-23-2015 at 07:19 AM..
# 2  
Old 01-22-2015
Maybe they stored options to stat in a variable which somehow isn't getting set? stat -$VAR and VAR somehow skips being set.

Or maybe sh isn't actually BASH.

Those are wild guesses. It's pretty much impossible to see what's going wrong without seeing the program.
# 3  
Old 01-23-2015
Can you try making it executeable
Code:
chmod +x VMware-workstation-Full-11.0.0-2305329.x86_64.bundle

and the running with
Code:
./VMware-workstation-Full-11.0.0-2305329.x86_64.bundle

?
# 4  
Old 01-23-2015
Cheers!

I've tried your suggestion gowron, but receive the same error after the second line.

ie.
Code:
stat: illegal option -- -
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]

---------- Post updated at 11:40 PM ---------- Previous update was at 11:32 PM ----------

Update: following thread others on linuxquestions along the same lines, nearly got there... but no. (nb. I typed in my wrong password first time)

Code:
bash-3.2$ ./VMware-Workstation-Full-11.0.0-2305329.x86_64.bundle 
stat: illegal option -- -
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
bash-3.2$ sudo ./VMware-Workstation-Full-11.0.0-2305329.x86_64.bundle 
Password:
Sorry, try again.
Password:
stat: illegal option -- -
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]

# 5  
Old 01-23-2015
I repeat. Without seeing what the contents of that file are, we can't know why it's plugging weird options into stat.
# 6  
Old 01-24-2015
According to this page, it is not supported on OSX. You probably need VMWare fusion 7 or fusion 7 pro
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to solve this problem "Illegal Option"

I am just trying to read the password from command prompt that user should type with in 10 seconds, I am getting "read: Illegal option -t" #!/bin/bash ... (1 Reply)
Discussion started by: KarthikPS
1 Replies

2. UNIX for Dummies Questions & Answers

What is the meaning of "-s" option in "if" statement?

Hi Guys, I'm sorry but I can't find answer for this, what is the meaning of -s option in "if" statement on unix scipting. Please see sample below: opath=/home/output for i in N1 N2 N3 N4 do echo $i if then grep $i $opath/N5_CRAI > $opath/N5_$i.crai chmod 777 $opath/N5_$i.crai ... (7 Replies)
Discussion started by: rymnd_12345
7 Replies

3. Shell Programming and Scripting

stat -c illegal option

I'm trying to get the size of each file, but when I try to use stat -c %s <file> I get the message stat: illegal option -- c Also, the man page for stat shows readlink,stat. It doesn't seem to match the man pages I've seen online. what is going on here? (6 Replies)
Discussion started by: nextyoyoma
6 Replies

4. UNIX for Dummies Questions & Answers

"tail -n 1 filename" error while "head -n 1 filename" is ok?

Hi all, I was wondering why tail -n 2 filename produce an error when I manage to do similar command on head -n 2 filename SunOS{type8code0}: tail -n 2 filename usage: tail ] tail ] (2 Replies)
Discussion started by: type8code0
2 Replies

5. UNIX for Dummies Questions & Answers

Error: "logger: illegal option -- p"

Hi All, I am working on a Solaris 10 server. From this month start, it gives the error "logger: illegal option -- p" with each command. If I execute a script whose output shown on terminal, it comes many times.. Could you please help? It comes only for my login. And I dont remember any changes... (4 Replies)
Discussion started by: jaiseaugustine
4 Replies

6. Solaris

How to resolve error "INIT: Cannot stat /etc/inittab, errno: 2"

Hi All, I am getting an error message when I execute command “zlogin -C sunsrv4z5” on my root server. INIT: Cannot stat /etc/inittab, errno: 2 INIT: Cannot stat /etc/inittab, errno: 2 As per my analysis it seems that some files inside /etc folder are deleted. This server was... (14 Replies)
Discussion started by: surbhit4u
14 Replies

7. UNIX for Dummies Questions & Answers

the meaning of "!:*" in "alias foo 'command\!:*' filename"

Hi: How can I remove my own post? Thanks. (2 Replies)
Discussion started by: phil518
2 Replies

8. Shell Programming and Scripting

Find and change flag "Yes to No" or "No to Yes"

name:age:girlfriend aa:11:yes bb:22:yes cc:33:no dd:44:no ee:55:yes I want to change the cc, the status of girlfriend to yes. Find cc, and then change! how can i do this? (16 Replies)
Discussion started by: rafazz
16 Replies

9. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

10. Programming

What is an "Illegal Instruction -Core Dumped"

Hai! i am working on Digital UNIX V3.2c Work station, my program uses Pro*C, C and X-Motif calls. i am facing problem while running application saying "Illegal Instruction Core Dumped". debugger dbx shows error at a line which shows "noname". when commenting large portion of the code it runs... (1 Reply)
Discussion started by: samn
1 Replies
Login or Register to Ask a Question