Ubuntu :: How To Apply Breaks In Text Files
Mar 31, 2011
I do not know what happened. But when I move the text files back and forth between Windows and Linux, the enters/paragraphs gets messed up and square characters appears. And I think it got worse when I deleted those squares. So now it is one very long line. How do I get the long line to break every 50 characters but not having the last word get cut off mid-word? I am thinking "cat textfile > something" but I do not know what that something is.
View 1 Replies
ADVERTISEMENT
Mar 26, 2010
I have some text files (Just plain text files, not OpenOffice files or anything) and when I try to open them in Windows they are all one line. I think I read somewhere that Linux uses for new lines whereas Windows uses or something... I am using Kate to edit them, and I have a LOT of files to fix so...
View 9 Replies
View Related
Jun 7, 2011
I work a lot with Unix bash shell environment. Whenever I go down the directory tree to several subdirectories, i.e., /home/a/b/c/d/ and so on and type in a long command, what happens is that command text wraps around onto the new line but when trying to edit command I can only go back to the beginning of the new line. So, for, instance, say I go to directory and type something like:
/home/a/b/c/d/find . -type f -exec sed -i <- end of line
's/blah/blah/g' {} ; <- new line
Here, the problem is I can't go back to the real beginning of my command that starts with "find", I can only scroll to the beginning of the new line with the part "'s/blah/blah/g' {} ;"
So I effectively loose control over what I typed and can't edit it when the command wraps to a new line. Does anyone else experience this problem?
I also have this problem on our Debian servers so I always have to make sure I type the right command the first time because I can't move back and forth to edit it when it wraps to a new line.
View 9 Replies
View Related
Jan 22, 2010
I have 2 text files : file1.txt and file2.txt
cat file1.txt
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
cat file2.txt
2 this is sentence1file2
6 this is sentence2file2
54 this is sentence3file2
I would like to join these 2 files. The result should look as follows :
cat joinedfile.txt
2 this is sentence1file2
6 this is sentence2file2
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
54 this is sentence3file2
==> so the joined file must be sorted on the first number. Any ideas how this can be achieved ?
View 4 Replies
View Related
Jul 19, 2010
My wife doesn't like gnome so I said I could make the desktop look like Windows 7. I've downloaded the theme pack but I can't find any instructions on how to apply it.
I downloaded it from here:
http://gnome-look.org/content/show.p...content=113909
I'm guessing it a Emerald theme, but I don't know what to do with the files.
Can someone point me in the right direction?
View 4 Replies
View Related
Jan 19, 2010
I want to add my daughter as a user and give her full permissions to all the same folders and files that I use. I have given her permission to folders and their sub folders however she doesn't have rwx on the individual files within the folders. What is the command line to set this up?
Also with the command;
Code:
chown -R root:root files
what is the -R for and when do I need or not need it?
View 4 Replies
View Related
Jul 29, 2011
i want to apply this command
Code:
pdftotext article.pdf - | grep DOI
to all the pdf's in a directory and save each line of output to a text file. i.e. i want to collect each line containing "DOI" from every pdf in a text file. I am unable to understand bash scripting enough to write a for loop for this.
View 1 Replies
View Related
Jun 1, 2010
Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.
View 4 Replies
View Related
Nov 5, 2009
I would like to write a text user interface (TUI) to adjust some text config files etc. Is there a tool or application for creating TUIs like this. I�m talking about those types of config tools which you see executed at first boot.
View 19 Replies
View Related
Jun 14, 2011
I have a partition that I mount as /data on all of my distros of my multi-boot machine. I am having a bear of a time figuring the right way to address permissions/groups so that any distro can use it (or any removable drive).I tried (in linuxmint) making a group '/data' and assigning the users on my machine to that group, then changing the permissions/groups of the files and folders in that mount as belonging to the /data group, then booted to fedora 15, made the /data group, added the users to that group, I'm not sure that this way will work (it doesn't seem to) or if it's the best way to proceed. some of the things I don't get are:what is the '1000' user and group?is the user/group info on (in or somehow attached) the mount itself?does this seem like a good way to do this?is there on way to 'apply permissions to enclosed files' recursively through the nautilus context menu?
View 3 Replies
View Related
Jan 15, 2010
may be an advanced question but I need to know how to do this. Here at work I am in charge of recruiting and we have about 1,000 resumes in already. All of the resumes are in a .pdf format. I need to rename every .pdf in the following format:{firstnameLastname}.pdfThe only way I know how to do this is to convert all the .pdf files to text, extract the name out of the first few lines of text, import into excel, and then use VBA to rename the files in mass:Here is my logic so far:~Deskop/a = houses all the .pdfresumesOpen terminal: Code: cd ~/Desktop/afor f in *.pdf; do pdftotext -raw $f; done That will convert all of the preceding resumes into text filesNow I would like to append the name of the text file into the last line of the text file. So, for example, for Resume1.txt, I want to append "Resume1.txt" to the last line within Resume1.txt. So after I run the command I open Resume1.txt and on the last line within I want to see "Resume1.txt" on the last line, at the end of the resume.How can I do this? I would like to use a loop and have the terminal append the filename to the body of the text file until all of the have been appended.
View 1 Replies
View Related
Apr 21, 2010
Currently, when I'm searching text in files of my PHP project, I use this line :
Code:
grep -r 'myTextToFind' *
But now, I would like to search only in ".lang" files. How can I do that ?
View 7 Replies
View Related
Oct 11, 2010
I found this command that works great finding and replacing a simple string to another in files located in that folder and all sub-folders.
Code: find . -name '*.php' | xargs perl -pi -e 's/OldText/NewText/g'
The problem I have is that I need to replace a more complex string, like this: Old string: /mnt/stor6-wc2-dfw1/627896/982574/ New string: /mnt/stor8-wc2-dfw1/369587/302589/ There I don't know how to do it... since the / is what separates the old from the new strings, and the strings that I want to replace have / in it. Also, I would like to know how to specify under what folder replace the files, for example, I want that it search/replaces all files under /var/www/mysite/htdocs folder.
View 1 Replies
View Related
Jan 20, 2009
I want to automate this using script.How to automate it?
File1:
s.no# 1 name:aaaaaa
city:abcd
[code]...
View 1 Replies
View Related
Apr 15, 2011
Fedora provides several compression techniques. E.g tar, tar.gz, zip etc. I want to know which among them provides
1. the best compression ratio for text files
2. the best compression ratio for binary files
3. fastest compression
View 6 Replies
View Related
May 25, 2011
How do you convert Open Office (ODT) documents to Text files?
I have made a report using libre office. Now I wish to continue editing the document using lyx (latex front end). So the ODT file needs to be saved as some .tex file.
I don't see an option to do this in File menu (export/save as). So is there any other plugin to do this?
View 1 Replies
View Related
May 11, 2010
Nautilus as root is on the left; nautilus as Ubunterooster (normal user) on the right Screen-shot# 1, Permissions before I change them. #2, after I change and hit "apply to enclosed files" before clicking the button labeled "close".
#3, The containing folder has all folders as belonging to root even though I told it to "apply to enclosed files".
#4, Obviously, I don't want to change permissions on every single file individually. I don't know how to change permissions to allow the folders and files to be able to be viewed by me (as a normal user) or by my SAMBA connected father.
View 3 Replies
View Related
Feb 15, 2010
I have two files which I would like to combine. Each file has 2 columns.
File 1:
1 a
2 b
[code]...
View 2 Replies
View Related
Mar 10, 2010
How can I compare two pdf files for text differences
View 3 Replies
View Related
May 25, 2010
A real os should at least e able to read and write plain text, you think? But no, when I try to open my text files (mainly made with gedit) some characters are ass, swedish letters rarely work and ', ", / and so on are not represented as the characters I want to see. Is there a easy, fast way to read (and print!) my text files at school, where they have only windows, without spending half an hour fixing the file by hand?
View 6 Replies
View Related
Oct 13, 2010
I need to view 10.858 text files by this friday to see which ones I need (searching file contents is not a solution), I was wondering if anyone knew any way/program to quickly view them as if they were, for example, images? And, optionally, to be able to save them to a different location from there? It doesn't necessarily have to be for Ubuntu as I also have WinXP and Vista, but it would save me having to transfer those couple of gigabytes to another computer.
View 3 Replies
View Related
Oct 29, 2010
So I have Python file :
Code:
#!/usr/bin/env python
print 'python'
raw_input('')
And another :
[Code]....
as it should. I don't want to take such a hassle always running python by path.
View 4 Replies
View Related
Nov 16, 2010
all my text files are opened with firefox how can I change that.
View 2 Replies
View Related
Mar 3, 2011
is there a way to directly open the executable text files in ubuntu without that annoying msgbox asking us to display or run in terminal mode...
View 1 Replies
View Related
Mar 6, 2010
I have a hidden folder with a lot of text files in it. I would like to search in this folder for all files containing a given text.The File Browser's" FIND searches only in the file names, not in their contents.The FIND function of Ubuntu does not allow me to search ONLY in the given hidden folder. So, how can I find my files within the hidden folder with the given text within them?
View 7 Replies
View Related
Apr 16, 2010
How do I get rid of this kind of annoying (silly) confirmation messages :
Quote:
Do you want to run "footer.php", or display its contents? "footer.php" is an executable text file.and then you have these buttons to choose from :
Quote:
Run in Terminal | Display | Cancel | Run
I've been clicking on Display for many many times
View 6 Replies
View Related
May 26, 2010
Through various Windows reinstalls and switches within Linux distros, I have a massive amount of duplication within my music archive (on the order of 7+ dupes of each file). Now, I found a lovely program called "fdupes" and was able to build a list of all the duplicate files, and I'm trying to use "xargs" to remove then. However, when I try and run the command "xargs -0 --arg-file="dupes.txt" rm" or "xargs -0 rm < "dupes.txt"" it give me the following error: "xargs: argument line too long".
how perhaps a different way of accomplishing the same thing?
View 9 Replies
View Related
Jun 14, 2010
I've got a text file listing 1823 files that need to be copied from their current locations, i.e.To another folder, any idea how I should do this?
View 4 Replies
View Related
Jun 20, 2010
I really hate this warning when I try to open certain types of files in gedit: (using ubuntu lucid)
Quote:
Do you want to run File.c or display its contents?
"File.c" is an executable text file.
Open in Terminal; Display; Cancel; Run
Is there any way to remove the warning? I have never once clicked anything other than display, and when I'm opening lots of files, having to hold down ALT-D to get rid of these warnings.
View 6 Replies
View Related
Sep 20, 2010
Make multiple text files into .lst wordlists?
View 7 Replies
View Related