I have a lot of files with tabs littered throughout, and I'd like to convert them all into spaces. I know about the expand command, but unfortunately I would have to type out every single file using it. Is there any easier way to do this on Linux?
Which do you prefer and why? Also, I remember someone telling me once that while using space indentation use either 4 spaces or 2 spaces. Don't use 3 spaces. Anyone know why they would say not to use 3 spaces?
I writing a script to go through multiple reports. I want to grep daemon.debug @10.10.10.10 on all reports to make sure it is pointing to the right IP address. the problems is the space between debug and @10 are different on all the reports, some have one space some have two and some have tabs how do I ignore the tabs or spaces and grep daemon.debug @10.10.10.10
Iam reading a file using C-sh script after manipulating the variables I need to dump into a new file. This in working fine but I couldn't retain the multiple spaces and tabs in a same line. For readability I want to print it back as I read. Now script treating multiple tabs as onl tab or space.
I'm trying to use convert, I have installed the imagemagick. I use this line:convert *.jpg test.pdf but I'm only able to convert to pdf 1 single jpg file, not multiple files at once. When there's more than one file, I get the following error: Segmentation fault
Is it possible, in Linux, to rename a file from something without spaces to something containing spaces? I know I can create directories and files with spaces by doing:
mkdir "new dir" and:
touch "new file.txt"
I want to rename files from:
imgp0882.jpg to something like:
20091231 1243 some topic.jpg
And how would it look in a shell script that uses parameters like:
for i in *.jpg do rename "$i" "$somepath/$mydate $mytime $mytopic$extension" ?
I'm new to Linux (using PCLinuxOS 2009.2), coming from Windows, and I've written myself a little shell script to download files from my camera and then automatically rename them according to a date-and-topic pattern. As you can guess by now, I'm stuck on the bit about renaming. If you want to see my script, here's a copy. I'm not using jhead for this renaming because that only works with JPEG files but I want a single solution for any media format including videos.
How do I access files with spaces from the command line? for example I want to go to a file called "New File" and let's say is in Downloads/Books/(and here is the file) how do I input the space since the command line doesn't recognize it?
I named a number of files with spaces in them, and I want to replace the space with "_". However, every time I write a command in the shell with the file name (eg "Spring 2011"), the shell doesn't recognize the file or directory. What can I do about this? Is there any way to use the unicode character for a space?
Firefox is sometimes slow opening new tabs/switching between tabs. If I click on the kickoff application launcher button, it takes a few seconds to open, and typing something in the search makes it hang up for about 20 seconds before it does the search. Clicking on an app takes 16 seconds before the menu window closes and the program begins to start. Then it takes another 30sec-1min before the app is usable. smplayer plays video with tearing.
Like right now I tried taking a screenshot, and it tells me
Error launching /usr/share/applications/kde4/ksnapshot.desktop. Either KLauncher is not running anymore, or it failed to start the application.
while the app worked fine.
I also tried running glxgears right now, and it runs but the gears don't move, and terminal states
15 frames in 19.0 seconds = 0.789 FPS XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 48 requests (48 known processed) with 15 events remaining.
If I'm on dolphin, and I click a video to start smplayer, it takes about 1 minute for it to start.
Memory is using 1.4GB out of 3.6GB, with 0.08GB/2GB swap
Top shows an average usage of less than 10% average. Xorg is always 25%, kwin is always 10% and then rest of the apps are less than that.
CPU: AMD Athlon(tm) II X4 620 Processor Integrated VIdeo: HD4200 with fglrx driver
When I ssh into the computer with x tunneling, the programs start up faster than being on the desktop
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?
i have a large directory of .bsp files that i would like to convert .bz2 archives. I've been searching for some time and all i can find is the obvious compress multiple files into one large archive. If anyone knows how to convert each file individually, while retaining the original file name (testmap.bsp would be archived as testmap.bsp.bz2)
I have Ubuntu 9.04 and just installed Sound Converter. I am trying to convert a bunch of .ogg files to mp3 to play on my iPod and it's not working so well. In the Sound Converter options I have is set to convert to high quality mp3. I choose the folder that the files are in and after a moment (slow laptop) Sound Converter populates, I hit 'convert' and it shows that the conversion completes in two seconds. All that it did was create the new folder structure of artist/album but there is nothing in there. Not sure what I am missing. I used Sound Converter before and it worked fine.
Is it possible to open text files in gvim in tabs not opening anothe rgvim window for every text file? Just like it is done in gedit: open a file the open another file and it opens in a tab.
I have a file (.tgz) which is meant to be simply copied to a floppy disc. I don't have a floppy disc, so I would like to convert the file to a .img file, so that it looks like a floppy disc but is on my hard drive. How do I do this? I have looked quite a lot. Surely there is some application that does it easily. This is for installation of Basic Linux, which comes on two floppy discs with ms-dos file systems.
I have a lot of .flac files downloaded from several sites. Most of them come with a .cue file, and the .jpg with the cover, etc. It seems it is the intention of the uploader that one rebuilds the original CDDA. However, if I had a stand-alone CD/DVD player with flac I would hardly see the point of converting the flac to cdda. Furthermore, I could even play the flacs with a software player although, in this case, the audio quality would not be so good due to the noise picked up by the signal from the PC digital circuits.
One system send files to linux machine and it is name contains spaces and I tried to move it from one directory to other, but it show error: Ex:- mv -f file one file two mv: target 'one' is not a directory
i need an application or shell script that can identify all the directories and files in a certain directory and can rename them to remove any spaces in the filenames.anyone know of anything that can do this?
My issue is I can't handle the files with spaces in their name, I've donde the below script to print each file found inside folder and subbfolders with "find".
I would like to "ls" to each file found with its complete path and with its basename too.
Code: files=$(find . -type f) for each in "$files" do ls -l "$each" # 1rst option I've tried to list with full path ls -l "$(/bin/echo "$each")" # 2nd option I've tried to list with full path ls -l "$(/bin/echo $(basename "$each"))" # 1nd option I've tried to list with it basename
[Code].....
How can I list "ls -l" in both cases (with full path and with basename) when there are files with spaces in their name?
I had a Windows XP Home box setup with MySQL, Apache, bind9, phpBB. Then one evening while preparing a Linux replacement my Windows XP Home tower died. It completely croaked. It won't boot up past POST at all. No beep codes or anything! It just sits there with the power on like a brick. I cannot boot it to grab the database through the webserver with any web based MySQL script system. I also do not have another Windows box that I can install MySQL on.
There is no possible way I have to retrieve any MySQL databases that I had on it except by mounting the hard drive where MySQL stored the databases for Windows on it. I've Googled for hours on end trying to find a solution but to no avail. I tried simply copying the contents of the database as-is from where it was on Windows to where it would be on Linux but when I try to browse the phpBB forums I get this error:
Recently, my hard drive crashed. I was using XP and do not have my install discs (lost them 3 moves ago...). I make backups regularly and only lost roughly 3 days worth of material (nothing really important). On my other PC I've been running linux forever. I don't need windows and have installed a new HD in the PC and put fedora on there w/ no issues. Now historical email. There seems to be many workarounds for getting dbx files to mbox inside windows, but how would I accomplish this task without a windows install anywhere (Virtual installs are out as I do not have any install discs for windows anyways).
After a quick search, I only found one possible solution (in perl) and am looking for something that I don't have to program my self. I am a programmer by trade but have never programmed in perl (c++, FORTRAN, matlab, python... yes) and at this point, don't feel like learning new syntexs for this one problem (python has been my goto scripting language for everything linux...). Also if anyone has a link to a c++ lib(link to documentation?) that does the same thing... I might take a look at that and make a gui for it... then release it for others...
I'd like to write a bash script to convert all of the .mpg files in a directory to .avi files. The ffmpeg part of this produces the kind of file that I want, but rather than changing the name of the input and output files each time that I run the script, I'd like to automate it. I've tried this script, but I get an error "command not found".
#!/bin/bash cd /home/michael_s/golf_temp 1 for i in 'ls *.mpg' ; do /usr/bin/ffmpeg.exe -i /home/michael_s/golf_temp/"$i" -map 0:0 -map 0:1 -pass 1 -vcodec mpeg4 -vtag xvid -f avi -b 1100k -vol 384 -mbd rd -s 640x480 -aspect 4:3 -acodec libmp3lame -ac 2 -ab 128k /home/michael_s/golf_temp/"$i".avi
how can I convert .wav sound files to .gsm format as I have an application for this usage ? Please be informed that I have made use of the sox utility for this purpose , as the followings , but it didn't get through : #sox FR00003.wav -r 8000 -c 1 FR0003.gsm resample -ql
I'm trying to convert all file extensions for files in many sub-directories from uppercase to lowercase. I have two problems, how to list the absolute path to the files recursively over many sub-directories for which I so far have this:-
Code: find ~/Photos -print which would be fine, except it gives the directories on their own when it finds them rather than just the files with absolute paths. I couldn't find a switch for the "ls" command to do this, so I had to improvise with "find". and once I get grab each absolute file name, to just change the file extension rather than the entire file, which is what I have at the moment.