Emacs. Helm package. How find files in folder (not a git folder) and all subfolders? - file

Windows 10 (64 bit), Emacs 25.1, Helm package.
To find file (e.g. myfile.txt) in any folder (not git, not project file) I use command helm-find-file. It's work. OK.
But now I need to find myfile.txt in current folder AND all subfolders. How I can do this by helm package?

There's two ways that should work for you. In both cases, first use helm-find-files.
1) Once you're in the directory that you want to start your search from, hit C-u C-x C-d (this runs helm-browse-project recursively). Now you can type the filename that you're looking for and it should search in all subdirectories.
2) Alternatively, again from helm-find-files, hit C-c / (this effectively runs find (not sure how well this will work in Windows)).

Using helm-find-files followed by the C-c / command effectively runs helm-find which lets you type in a filename to search for from the current directory. You can also just call helm-find directly or helm-find-1 if calling from elisp code.

Related

DOSBOX In Ubuntu: Unable to open include file 'stdio.h' [duplicate]

Whenever I compile my program, I get the error above.
If you have problems like that, first of all your TC folder put in to the C:..drive.
after completing installation open turbo c blue screen.
there is a OPTIONS > Directories ..in that you can see for option to set up path..
include directories..you can set path there now.. C:\TC\INCUDE
libraries Directories..you can set path there...C:\TC\LIB
if you want to store your output in BIN then you can set..C:\TC\BIN..otherwise you can set another path where you want to store your output..
Finally you can give OK and finished processes..
It will now work properly
Do this: Open your turboc2 folder you have tc.exe file inside, beside this file you find another file as named as ' tcinst.exe ' open it.
You will see the installation menu:
select as-- > Option > Directory > Include directory
Here you have to change the path of the directory to the path where your INCLUDE folder is located. Same way change the path to library directory also over restart your tc.exe.
Check if you have anything like those stdio.h file and other header files under INCLUDE folder and LIB folder. LIB contains some files. In my case, I had the same issue but both of these folder were blank.. good to know.
Steps:
Press: ALT + O + D (i.e. press ATL (keep pressed) and then O english character) and then D).
You'll see a popup window.
This window will have values for INCLUDE and LIB directories. The by default value for these two boxes in the popup window are: Drive leter where you installed TC... i.e. C:\ or D:\ or whatever followed by the path for INCLUDE and LIB folder. So, in my case,
INCLUDE box was set to: "C:\TC\INCLUDE" and LIB directory value box was set to: "C:\TC\LIB" (without quotes).
Steps to resolve:
Press ALT + C.
Set your current directory as C:\TC\BGI
Press ALT + O + D, and put ../INCLUDE and ../LIB in Include/Lib directory values.
and now... when you'll run your progress, you'll say thanks to me. I like the archduchess C fractal graphics that I'm running on DOS Turbo C right now. Lol.
Go to OPTIONS tab then select directories option then enter the particular path where your turbo c folder exists.
Enter the path in all the four message boxes and it would start working like it did in my case. I have TurboC3 and all the files were together in one common root folder.
Check your environment include path. The file is not in the locations pointed by that environment variable.
Well, I've been working backshift just spent about 6 hours trying to figure this out.
All of the above information led to this conclusion along with a single line in dos prompt screen, when I exited the editor, go to the dos prompt my C: drive is mounted.
I did a dir search and what I found was: the way in which I had mounted the C drive initially looked like this
mount c: /
and my dir did not list all files on the C drive only files within the turboc++ folder.
From that I had drawn the conclusion that my directories should look like:
c:\include
not
c:\turboc++\tc\include
or
c:\tc\include
The real problem was the nature in which I had mounted the drive.
Hope this helps someone.
b.mac
Since you did not mention which version of Turbo C this method below will cover both v2 and v3.
Click on 'Options', 'Directories', enter the proper location for the Include and Lib directories.
On most systems, you'd have to be trying fairly hard not to find '<stdio.h>', to the point where the first reaction is "is <stdio.h> installed". So, I'd be looking to see if the file exists in a plausible location. If not, then your installation of Turbo C is broken; reinstall. If you can find it, then you will have to establish why the compiler is not searching for it in the right place - what are the compiler options you've specified and where is the compiler searching for its headers (and why isn't it searching where the header is).
Make sure the folder with the standard header files is in the projects path.
I don't know where this is in Turbo C, but I would think there's a way of doing this.
First check whether the folder name is right or wrong since while you copying to one folder from other accidently it takes other folder address eg it take C instead of F So from OPTION>DIRECTORY change the folder name
Just Re install the turbo C++ from your Computer and install again in the Directory C:\TC\ Folder.
Again The Problem exists ,then change the directory from FILE>>CHANGE DIRECTORY to C:\TC\BIN\

Rename Multiple files in a Unix Directory by removing characters

I would like to rename Multiple files in a Unix Directory using Ksh Command.
Eg ATT8-2011-10-01 00:00:00-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF
needs to be renamed as
ATT8-2011-10-01-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF
Basically the time portion which is always 00:00:00 needs to be stripped off and the space between the date and the next hyphen symbol (-) needs to be compressed.
Any ideas as to how to this ? Assuming they are about 3000 files in the directory.
On some systems, there is a Perl-based rename command (sometimes called prename) and you'd write:
rename 's/ 00:00:00//' *" 00:00:00-"*
If you don't have that, find it. If you can't find it, then you have more work to do. However, the work is searching on SO. For example, Underscore in rename command (Perl and Unix shell) has a link to one version of the prename (Perl rename) command.

Find multiple files from the command line

Description:
I am searching a very large server for files that is on a different server. right now I open command prompt and type
DIR [FILE NAME] /S/4
This returns the server location of the file with some other stuff that is not really needed.
Question:
I have a lot of files to search and one by one input into the above command could take forever. Is there a way I could input all of the names of all the files and only search once and the search results would only need to show file name and location?
First, I hope you don't mean DOS, but rather Windows cmd or batch.
You can certainly write a script that will run your DIR command once per file being sought.
But what you most likely want instead is to search once and print the path of each file found. For this you can use PowerShell's FindChildItem or the improved one posted here: http://windows-powershell-scripts.blogspot.in/2009/08/unix-linux-find-equivalent-in.html
It will be something like:
Find-ChildItem -Name "firstfile.txt|secondfile.txt|..."
Another approach is to install msys or cygwin or another Linux tools environment for Windows and use the Linux find command.

IBM i PASE tar - Excluding files or directories

I want to exclude some directories from an archive using the PASE tar command on an IBMi but the [-X Exclude File] option doesn't seems to work for me.
I tried using an exclude file that just contained a file name (/home/JSMITH/data/sub2/file2.txt) and then one that just contained a pattern (*.txt), and neither archive operation omitted anything.
Given the following directory structure:
/home/JSMITH/data
/home/JSMITH/data/sub1
/home/JSMITH/data/sub1/file1.txt
/home/JSMITH/data/sub2
/home/JSMITH/data/sub2/file2.txt
/home/JSMITH/data/sub3
/home/JSMITH/data/sub3/file3.txt
and the following command:
/qopensys/usr/bin/tar -cvf /home/JSMITH/test.tar -X /home/JSMITH/excludes.txt /home/JSMITH/data
The entire /home/JSMITH/data structure gets included in the resulting archive.
I have tried using the /home/JSMITH/excludes.txt file with either of these contents:
/home/JSMITH/data/sub2/file2.txt
or
*.txt
How does one exclude files/directories/patterns from the IBMi PASE tar command?
You need the full path in the exclude file.
I created mine via ls /home/JSMITH/data/*.txt > /home/JSMITH/excludes.txt
If you're doing it by hand, make certain you haven't got any trailing whitespace.
Also, I used Notepad++ when I created mine by hand. I found that the green screen edtf created an EBCDIC file with CRLF in it, and that didn't exclude for me.
IBM i 7.1

Delete a file named "NUL" on Windows

I ran a program on Windows 7 that was compiled under Cygwin and passed "NUL" as an output file name. Instead of suppressing output it actually created a file named "NUL" in the current directory. (Apparently it expects "/dev/null", even on Windows.) Now I'm stuck with this "NUL" file that I cannot delete!
I've already tried:
Windows Explorer - error: "Invalid MS-DOS function" (yes, that is seriously what it says!)
Command prompt using "del NUL" - error: "The filename, directory name, or volume
label syntax is incorrect."
Deleting the entire directory - same deal as just deleting the file
remove() in a C program - also fails
How can I get rid of these NUL files (I have several by now), short of installing the full Cygwin environment and compiling a C program under Cygwin to do it?
Open a command prompt and use these commands to first rename and then delete the NUL file:
C:\> rename \\.\C:\..\NUL. deletefile.txt
C:\> del deletefile.txt
Using the \\.\ prefix tells the high-level file I/O functions to pass the filename unparsed to the device driver - this way you can access otherwise invalid names.
Read this article about valid file / path names in Windows and the various reserved names.
If you have Git for Windows Installed (v2.18) do the following
Open the directory containing the files you want to remove
Left Click and select Git Bash Here
Type rm nul.json at the command prompt and hit ENTER, the file now should be removed.
NOTE: These screenshots show the removal of file nul.topo.json which is another file that I could not removed with a simple delete.
If you have git on windows, just right click on the folder containing the nul file -> go to gitbash here -> and type "rm nul" or "rm nul.json" depending upon the file type.
I had a similar issue. It was probably caused by Cygwin as well (since I use this regularly), but I've since forgotten exactly how the file was created.
I also had trouble deleting it. I followed the advice of some other posts and tried booting into safe mode to delete the file, though this did nothing. The tip from +xxbbcc didn't work for me either.
However, I was able to delete the file using the Cygwin terminal! Cygwin createth and Cygwin destroyeth.
To remove a nul file situated here:
C:\unix\cygwin\dev\nul
I simply use (tested only on Windows 10) :
Del \?\C:\unix\cygwin\dev\NUL
I solved this in a slightly different way.
I thought I would add this here because it is high in the google results and I had a similar issue for a folder named NUL.
I tried rmdir\\?\C:\My\Path\NUL and rmdir\\.\C:\My\Path\NUL without any success and also tried several commands using bash from my SourceTree installation. No joy.
In the end I used DIR /X /A from cmd to list the short names in the parent directory. This showed me NUL~1 for my NUL folder and identified the crux of the problem.
This was then used in the standard command rmdir /s NUL~1 and finally resolved the issue.
I was having this same issue.
If you have WSL2 installed just go to that directory and run:
rm -f nul
In my case the file was lowercase. You should be good.
Try writing a short C program that calls the Windows API to delete that file.
http://msdn.microsoft.com/en-us/library/aa363915%28v=vs.85%29.aspx
If that doesn't work, try opening a handle to the file with CreateFile() with FILE_FLAG_DELETE_ON_CLOSE, and then close the handle.

Resources