39

i am currently having problem with 'meteor' and i am currently new to this learning this stuff. So, after installing 'Meteor' i opened command prompt on Windows and typed :

meteor create goodboy

and then,

cd goodboy

But to delete the live and already running example app, i used :

rm goodboy.*

But the command prompt, gave this error :

rm is not recognized as an internal or external command, operable program or batch file.

Is there anyway i can fix this error, thank you.

Shreya
  • 2,251
  • 1
  • 7
  • 10
user2891869
  • 569
  • 1
  • 4
  • 12

11 Answers11

59

Use del on Windows.

Also, this has nothing to do with Meteor. You can also delete a Meteor project by going to the folder and dragging it to the trash.

Eliezer Steinbock
  • 4,728
  • 5
  • 31
  • 43
47

If you are on windows, git bash may run such commands.

dasfdsa
  • 7,102
  • 8
  • 51
  • 93
  • 1
    That works, thanks! It is so usefull for me in situation when I have scripts for linux in my project but I work on windows. – Paul Jul 21 '22 at 11:01
20

If you are using Mac then we can simply use

rm -f src/*

and For windows we can use command for this is

 del -f "src/*"

Hope this works fine for you.

Amitesh Maurya
  • 209
  • 2
  • 3
6

Download and Extract PortableGit.

This has most of commonly used Linux based tools ported to windows.

Add [PortableGit Path]\usr\bin to PATH variable of Windows

You can also use your system's Git installation instead of PortableGit.

This should solve the problem

Neuron
  • 5,141
  • 5
  • 38
  • 59
Tejasvi Hegde
  • 2,694
  • 28
  • 20
  • 1
    This was really useful! A small tip: on windows 10 default path with git utilities will be "C:\Program Files\Git\usr\bin" – Yury Kozlov Apr 06 '22 at 00:48
3

I'm running Git shell prompt and for some reason it doesn't have it any more. I ended up using Cygin to get it working:

https://www.cygwin.com/

The Coder
  • 4,981
  • 2
  • 29
  • 36
3

My penny's worth.

You could potentially add rm to powershell. In your (or a) profile.ps1 (or other if your powershell is not core).

rm {
  del
}

or as an alias

Set-Alias rm del

or (and this is a tricky one), run WSL, bind the target folder and run via the linux interface.

PS: running the command via the Git Bash (MINGW64) terminal as suggested above, did the trick for me.

lucsan
  • 712
  • 9
  • 10
1

I guess you are not using bash terminal. Try this..

1- Go to the folder that you want to remove its contents lets call it my-app folder.

2- Right click in the empty space, then choose get Bash here.

3- Paste the command rm -f A_folder/* (I'm about to remove the content inside A_folder folder which is a sub-folder inside my-app).

4- Hit enter.

That should remove all content from A_folder folder. Hope that helps.

shireef khatab
  • 977
  • 2
  • 13
  • 33
1

I guess you are not using the Git Bash terminal but the normal command prompt. Do try the same on the Git Bash terminal and you would not face this error anymore.

0

first, install linux clients for windows, I use Ubunto LTS then install node.js and run your command again. here, you find good instructions to do it so, as well as how to install cool new Windows Terminal

Amin Keshavarzian
  • 3,646
  • 1
  • 37
  • 38
0

you should add "remove-build": "rmdir /s /q build", "create-build": "mkdir build", "clean": "npm run remove-build && npm run create-build",

in package.json

0

Install the Unix Utils package for Windows, which includes the "rm" command. You can download it from here:

https://sourceforge.net/projects/unxutils/

Add the path to the Unix Utils package to your system's environment variables.

To do this, follow these steps:

Open the Start menu and search for "Environment Variables".

Click on "Edit the system environment variables".

Click on the "Environment Variables" button.

Under "System Variables", scroll down and find "Path" and click "Edit".

Click "New" and add the path to the Unix Utils package (e.g. C:\Program Files\UnixUtils\usr\local\wbin).

Click "OK" on all windows to save your changes.

Close and reopen your terminal window to apply the changes.