There are a lot of exe files in my pen-drive (reside in different directories).
How can I delete all the files using Linux command?
Removes all exe files in the current directory tree.
find . -name "*.exe" -delete
If your pen drive has more than 2 directory , then you need to run this command in each directory.
Related
I want to use commands such as mongodump/mongorestore/mongoexport on my local windows computer and have therefor downloaded the .msi extension version of mongodb database tool and also executed the .msi so it could be installed.
But what do i do now to start using the commands. I cant find any documentaions of this. Is there something i have to configue?
When i execute a command like mongodump on my system command line i get the response:
'mongodump' is not recognized as an internal or external command, operable program or batch file.
Do i maybe have to execute the command from a certain dir location?
Look for the highlighted folder on your system. When you install the database tools this folder is created. Inside this folder there is a bin folder which contains all the commands you are looking for.
Once you find this folder then navigate to bin folder. And open a command prompt at that location. And try running the commands.
Alternatively:-
You can set PATH to bin folder and then you will be able to run the commands from anywhere.
I am using Notepad++ with workspaces, created through "Open Folder as Workspace".
I am trying to launch external command from Notepad++ using the Run command menu.
The variable FULL_CURRENT_PATH give me the current file path but I need to get the worskpace path to launch some deployment script in the root of the workspace.
Is there a variable for workspace path ?
I'm afraid there is no such variable. You can see a list of all variables in the source code of Notpad++:
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp
You can read the Workspace directories from the configuration file, but the file will only be written if Notepad ++ is closed. Maybe someone has an idea how to trigger that
cmd /c echo. |powershell -Command [xml]$nb = Get-Content $env:appdata\Notepad++\config.xml; Write-Output $nb.NotepadPlus.FileBrowser.root.foldername
On Windows, when I enter gvim it finds the file under C:\Program Files (x86) even though that vim directory is not in my system path. So how does it find it?
On Linux, I can enter this command, which shows that there is a link /usr/bin/gvim.
locate gvim
However, that does not work in PowerShell. I also tried this but it does not work because apparently -path expects a single directory.
gci "gvim*" -path "$env:PATH" -r | select FullName
How do I find the shortcut that is used? Answers using PowerShell are preferred, but any elegant solution is okay.
The documentation says this file is here
/etc/mongorc.js
Some other resources say that this file is under home directory.
I was not able to find this file in both places. Please help!
Note that my OS is Ubuntu 14.04
Files beginning with . are hidden files. If you are viewing nautilus, in home folder:
ctrl+h
will show you the hiddenfiles.
If you are viewing in command line, try in home folder
ls -a | less
or
ls .mon*
If there is no file, you can create it in the home folder and start using it with the name .mongorc.js in the home folder.
is there a way to move a folder to trash using cmd.exe? (Windows Vista)
(that is, the behavior should be identical to user moved the folder to trash from GUI)
is there a way to do it using PowerShell?
For PowerShell, see: How do I move a file to the Recycle Bin using PowerShell?
For CMD, see: CMD Command to delete files and put them into Recycle Bin?