General :: Set A Pattern That Will Output A Filename Equal To The Original Filename In SoundConverter?
Jan 23, 2011
$ uname -a
Linux a 2.6.35.10-74.fc14.i686.PAE #1 SMP Thu Dec 23 16:10:47 UTC 2010 i686 i686 i386 GNU/Linux
$ lsb_release -a
LSB Version: :core-4.0-ia32:core-4.0-noarch
[Code].....
How can I set a pattern that will output a filename equal to the original filename? E.g.
I've installed ethernet adapter, it is made in china from a manufacturer called FOX. The driver for that adapter is supported for sco linux kernel version 2.4.x and 2.5.x .However, I'm using Centos5 but the OS didn't recognize the adapter alone, so I'm trying to follo instructions on the driver on the attached CD.
The CD contains file named "SC92031.c", the instructions tell me to do the following "Compile the driver source files and it will generate sc92031.o"
I wish to know what could be the possible cases for this error:cp: reading `filename': Input/output errorI am getting this message when I am trying to copy a big file of around 50MB.
How can we convert a dynamic library (filename.so) to a static library (filename.a) using gnu gcc . Can we get a static library form a dynamic library . I saw a few post in which the conversion form a static library to a dynamic library is mentioned but, unfortunately, not the other way.
My employer issues pdf files with everyones work schedules. I copy the content and save it as plain text in a file called unformatted (hope to be able to automate this step someday). Im working on a SED script that reduces unformatted to only display what I want to see and saves the result in a file Iïve named formatted. After that I have to manually copy formatted and save it with that days date as a filename e.g. 2011-02-25 or whatever day is scheduled in the pdf, for use on a mobile device (Nokia N900). I noticed that the date occurs on certain lines in the file so I added a line like:
sed -n 's/^Date: (201[1-9])/([0-1][0-9])/([0-3][0-9]).*/1-2-3/p' < unformatted >theDate That creates a file theDate with the date in it that I wish to use as the filename for this particular instance. So I would like to skip the file formatted all together and have the sed- script write to a new file using the content of the Date as a filename, but how do I make that happen? And of course it would be more elegant if I could skip the intermediate theDate file as well.
actually i want to extract the substring between 2 underscores e.g. in case of 1_40_37573.dbf i need 40 and in case of 1_101_37373.dbf i need 101 and so on
I have some school work that involves creating a script that creates a backup of my /home folder, everything goes well but the problem is with the filename.
I am supposed to create a .tgz with the filename : hostname-day-date-HH:MM:ss.tgz
The .tgz gets created with the correct filename but when I try to unpack it the filename can't be resolved, it's the : that mess things up.
in directory a_dir, have a file named a_file.i can type "source a_file" under directory a_dir and execute successfully.but if i write the command to a Makefile under directory b_dir, the "source" function can't be executed well. it will generate some error message like this:
./a_file: line 1: setenv: command not found ./a_file: line 2: setenv: command not found ./a_file: line 3: setenv: command not found ./a_file: line 5: setenv: command not found
I would like to remove a part from wiz_khalifa-black_&_yellow-(82_bpm).mp3 The part to be removed is -(*_bpm)
so that makes wiz_khalifa-black_&_yellow.mp3
Also a problem is that sometimes multiple "(" occur in a filename (wiz_khalifa-black_&_yellow-(remix)-(82_bpm)), so how can i only remove from the last "("
I have just re transcoded a bunch of avi's. to tell the new ones from the old ones I put '[xvid]' at the end of all the new avi's. but now I have deleated the old avi's I want to remove the [xvid] part of the file name. This is what I have so far
Code: #!/bin/bash for name in *.avi do newname=`echo "$name" | tr -d [xvid]`
I have a directory that has a large number of files, around 1.5 million at this point. If I go to the directory and type in "ls filename" for a filename that I know exists, ls just hangs. I have let it run for over 20 minutes and it never does anything. Up until yesterday the directory was working fine through samba serving up files, but now it doesn't return anything. How to proceed from here?
I run 5GBFree.com a free hosting site. As you can imagine, it gets quite a few people signing up to abuse the service.Recently I've found a LOT of people setting up sites with a particular script that floods forums and IRC chat rooms. The names of the files are as follows:
Is there a command I can run to remove files with these filenames ANYWHERE on the server (so basically, a command to go through all folders on the server and remove instances of that name
I am trying to strip the .wav file extension from a file name so that I can pass the result to lame encoder. I started to write a BASH script that looks like this:
Code:
for f in /home/user/wavfiles*; do FILE=basename $f .wav; lame $FILE; done
It doesn't work very well though. For the life of me I can't seem to discover how to use basename in a suitable way for a script like this.
I have a very large directory with probably millions of small files in it. It's taking forever to run ls on the directory.
Is there an easy script that I can run to split the directory into smaller ones, based on the prefixes of the filenames. My goal is to wind up with something similar to what the Debian archives' pool directory looks like.
I'm trying to learn to rename files with the command line, and after browsing around a lot of pages I finally found a command that uppercases the first letter of a file, but the problem is that I want to understand the meaning of each command. The command is: for i in *; do new=`echo "$i" | sed -e 's/^./U&/'`; mv "$i" "$new";done I understand the 'for' kinda... but not the 'echo' or '`' and especially the sed command.
I have local Wordpress database that got corrupt as a result of an abrupt power outage (I wasn't even editing it!).
Since the system I am dealing with is pretty static (and old), I just want to restore that database file (or collection of files) from a nightly backup.
But I don't know which files I should be restoring. The WordPress blog in question is installed under a local user account in an old Linux server (FC4).
I checked the wp-content directory, but apparently this is not where the content is:
Any idea which file(s) I should be restoring and what their path is?
I'm working with a lot of data, but always the same. I have, say 2GB that I keep loading 100 times a day from a local disk to do some computations.I was wondering if anyone knew if it is possible to read it once for all and then access it like a file but with the speed of RAM access. I would be looking for something like: Code: file2mem ~/mybigdatafile.dat ~/mybigdata_thats_now_accessed_superfast.dat And then the data is accessible in a way like with a symlink...
I am using the following command: zgrep -a --text "TEST" * | awk -F"[ .,]" '{sub(".*:","",$6); sub(",.*","",$7); print $1,$6,$7,$10} and getting N3 2009-11-25 20:12:57 TEST N4 2009-11-28 10:42:18 TEST N6 2009-12-01 10:00:24 TEST
If I only want to search the log file after 2009-11-29, what shall I change the command?
I am using wget to download files from a HTTPS site.My command goes as below. I have used * as wildcard to denote anything can be there between underscore and ".". Please advise on how to solve this./usr/sfw/bin/wget --no-check-certificate --user=LTSTSSB --password=pass -O temp.txt https://234.123.432.33:444/Reporting/File-To-Get_*.xml
Trying to write a shell script called make to read a file called dirs with the following in it programs scripts documents Read file line by line and make the directories in the current directory when you type ./make dirs if no file is given then program should print usage: make dirs filename
From this directory, I want to know how I could use grep to display files based on part of their filename - for example those starting with "Account" or those ending in ".sh".
I thought 'killall' would work, but I need to provide the "command" to kill. I'm really looking for a command that will kill all processes that have a particular file/directory open. Currently, my script fails on an 'umount' because there are several processes that have this filesystem open. The command 'lsof' is a good tool to determine which processes have a filesystem open, but I don't really want to write a script that parses through the 'lsof' output to capture PSIDs. Is there a linux command that can kill all processes that may have a particular filesystem open?
I saved a page from Linuxquestions. It was saved under a filename beginning with '[' (left square bracket). And I now can't delete the file. Unfortunately I cannot send you a screenshot because opening a terminal in the GUI makes ls behave differently. I shall try to describe, assuming the file is in dir '.'. Also let '[SOLVED]foo.html' be the file in question:
Code: $ ls <the file is listed> $ ls [* /bin/ls: cannot access [*: No such file or directory $
If I want the hdd to get rid of this file, what should I do? Any hint will be welcome.
I know how to take a screenshot on my Ubuntu, but I want to take many screenshots within a limited time (taking screenshots of a single execution of a program which I can not pause). Is there a program that takes the "PrtScr" keyboard key in charge and just stores every screenshot without asking? The standard Ubuntu tool pops up a dialog to ask where I want to save the file, I would like a tool that doesn't ask and just saves on the Desktop or wherever as 00001.png 00002.png etc.