It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
In Emacs, how does one rename a directory in dired-mode?
In dired, if you select a file and type 'R', you'll get a prompt under the modeline which will guide you through renaming the file. This works for files in general, including directories.
In general to explore dired-mode you can use C-h m and will get a useful summary
for example :
Type u to Unmark a file or all files of an inserted subdirectory.
Type DEL to back up one line and unmark or unflag.
Type x to delete (eXecute) the files flagged 'D'.
Type RET to Find the current line's file (or dired it in another buffer, if it is a directory).
Type o to find file or dired directory in Other window.
Type i to Insert a subdirectory in this buffer.
Type R to Rename a file or move the marked files to another directory.
Type C to Copy files.
Type s to toggle Sorting by name/date or change the `ls' switches.
Type g to read all currently expanded directories aGain. This retains all marks and hides subdirs again that were hidden before. Use SPC' andDEL' to move down and up by lines.
Related
This question already has answers here:
Why does emacs create temporary symbolic links for modified files?
(2 answers)
Closed 6 years ago.
Whenever I edit a file in emacs, I get a link in the current directory that looks like
lrwxrwxrwx 1 mpersico users 65 Feb 15 12:04 .#theFile -> mpersico#myhostname.nnnnn:nnnnnnnnnn
where the 'n's are 0-9. The first five n's are the pid of the emacs process. The file only appears while there are unsaved edits. Typing one key in the buffer creates the file. Saving the buffer removes the file.
Any idea what that file is and if it can be moved somewhere else? It's causing spurious errors in my rsync snapshotting setup.
TIA
It's an interlock: it's created when a buffer is modified in order to allow emacs to warn you when somebody else has modified it. See https://www.gnu.org/software/emacs/manual/html_node/emacs/Interlocking.html#Interlocking . I don't think you can move it to some other directory without compromising emacs's ability to detect such conflicts. OTOH, you can disable it (see the link above) and emacs will ignore the conflict all together.
I have file "sample.twitter4j.properties" but there is a question mark on it why?
and what does it means?
It's a file that is not in source control (whereas the ">" next to Crawler.java indicates that the file has changed).
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I would like a batch that reads a file called ships.txt, then takes the entries (each on a line) from that file and compares them to a file with the file extension of *.map (say test.map), looking for the match, which will always be at the end of a line. Then take those coordinates (they will be a pair of numbers that are actually long. and lat. in meters) and plug those coordinates into a perl script, which produces a file. I'd like then to read the file that is produced by the perl script and delete an entry that is found within another file using information from the perl script by-product.
Lets start from scratch. One step at a time
Step 1:
I would like a batch that compares "test.map" and "ships.txt". If it finds a match, and the match will always be at the end of a line in test.map, I'd like it to grab map coordinates.
This is what test.map will look like:
Code:
Pt0=14497903.00,-813490.00,0.00,Mark 1
Pt1=14417253.00,-812258.00,0.00,Mark 2
etc...
ships.txt will look something like this:
Mark 1
Mark 3
etc...
So I'd like the batch to read ships.txt and be looking for the entry "Mark 1" or "Mark 2" etc..., and if it is found in test.map, to grab the coordinates just before the ",0.00,Mark #" Notice the coordinates have two decimal places and they can also be negative.
How is this done?
Here is how it could be done.
Here is how you could open a file for read or write in perl. Then you have to read the files, line by line. Maybe it is better to use text::csv to read the files.
Use split or text::csv to create array from the first file lines, and store it in a hash, key should the last field of that file.
When you iterate over the second file, you could use this hash to check it in the first file or not.
Then write your result to a file.
Try to write your code and if you have a specific question you could create a new one.
Or you could hire someone to do this for you.
Regards
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am newbie to perl, I would like to write a perl script to read in multiple text files and look for string and copy the line containing string to an spreadsheet.
Ex: I want to open file csv.txt and look for string "Color" in each line and copy the line to a spread sheet
Color: Name any color
From this line I want to copy Name any color to spreadsheet.
Thanks
For starter: Read CSV file you could use Text:Csv.
http://metacpan.org/pod/Text::CSV
Nice tutorial: http://perlmaven.com/how-to-read-a-csv-file-using-perl
You could use simple regexp to find every line:
if ($line =~ m!Color!){
#do things if $line contain this word
}
You could write a new excel file with this module: Excel::Writer::XLSX
http://metacpan.org/pod/Excel::Writer::XLSX
I you still have a trouble, close this question, create a new one and do not forget to include your code there: https://stackoverflow.com/questions/how-to-ask
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Create 10000 text file with DOS with text
so filename will be 1.txt and inside of it will be "numeric1.txt"
and the next text file will be 2.txt and inside of it will be "numeric2.txt"
...
and the next text file will be 10.txt and inside of it will be "numeric10.txt"
.
.
.
.
until the last text file will be 10000.txt and inside of it will be "numeric10000.txt"
Can you please help me with that ?
Regards
Update for this question
How I can make it write all this lines (with same number of files and file name like above)
#echo
cd..
cd..
cd /folder
text -u text -w numeric1.txt
FOR /L %A IN (1,1,10000) DO echo numeric%A.txt>%A.txt
#echo OFF
FOR /L %%G IN (1,1,10000) DO echo numeric%%G.txt > %%G.txt