Programming :: Find And Cp Not Working?
Aug 6, 2010
The below script takes a date and table name from the user. It unzips and untar a file from archive folder based on date. Then select the required file based on the tablename provided and copy it to ../posextract folder.The folder posextract contains already extracted files for the user.
Code: echo "Enter date
"
read lookdate
[code]....
View 2 Replies
ADVERTISEMENT
Dec 19, 2008
I am unable to find a description of alsa's programing language, this sort of stuff:
[Code]...
I need to know what, for example, 'ttable' means and what is its syntax. This seems to be a state secret.
View 2 Replies
View Related
Jul 30, 2010
Is there any way to find the core files with out using the FIND command?
View 1 Replies
View Related
Dec 28, 2010
I compiled the GMP library and put it into a local directory (I have no idea where to put it otherwise (or how), but I'm just going to use this once anyway). I put this into the terminal:
gcc -L/Users/adm/Downloads/gmp-5.0.1/ -lgmp /Users/adm/Desktop
/main.c
--> gmp.h: No such file or directory
It won't find gmp.h (which is in that directory) and I don't want to compile my file inside the library directory. I have also tried this with no success.
LD_LIBRARY_PATH=/Users/adm/Downloads/gmp-5.0.1/
View 14 Replies
View Related
Apr 19, 2010
I've got this line find . -type d -name 'elements' -exec rm -rf {} ; put together to find and delete all directories named elements and their contents.
It does work but whenever I run it I get the error/warning
Code: find: `./dir3/elements': No such file or directory
find: `./dir6/elements': No such file or directory
[code]....
View 4 Replies
View Related
Aug 7, 2010
root@artos-laptop:~/habesh# /opt/Artos_toolchain_1.3/bin/arm-linux-gcc -o test2 base.c `pkg-config --cflags --libs gtk+-2.0`/opt/Artos_toolchain_1.3/bin/../lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld: cannot find -lgtk-x11-2.0collect2: ld returned 1 exit statusit compiled for linux succesfully and can execute. i try to cross compile gtk program for ARM board. but it results in this error.
View 2 Replies
View Related
Apr 6, 2011
I'm having trouble with codeblocks and a widgets application. Im trying to create a basic application, but i need to include the wx/mousestate.h file. When i compile it cannot find the file. I'm afraid i need to install any module, but i have installed a lot of them and i couldn't solve the problem.
View 3 Replies
View Related
Mar 20, 2010
I would like to learn how to program on Linux but I cant find any informaton on GCC. The manual is like a list that has no meaning to a novice. Are there any books out there that are not writen by Stallman? Is it more practical to learn it on another O.S and then transpose the information over to the Linux context?
View 14 Replies
View Related
Aug 2, 2011
How to find the source for 4ge programs ?
View 5 Replies
View Related
Apr 27, 2010
I'm currently booting Linux Mint off a live USB, and its really great. The only problem i'm having is that i'm trying to get this one program, called Monica, it adjusts the gamma values, etc for your monitor, which i need because my monitor is kinda messed up :P. But yeah, the site that hosts it is down, and I cant find a single working mirror. If anyone has the package for it, would it be possible to upload it?
View 5 Replies
View Related
Sep 1, 2010
I am fairly new to linux but I want to write a function to find any file with only a partial name. I can only use sh shell and busybox applets for this.I could do something like the sad code below...
Code:
TEST_ONE=$(find /path/to/directory -name *$1*)
TEST_TWO=$(find /path/to/directory -name $1*)
TEST_THREE=$(find /path/to/directory -name *$1)
[code]....
fi I just made that up but obviously it is pretty bad I'm sure there is a much better way to do it but I just can't think of a way. I also would like to have the file found even if capital letters are used and the file is all lower case.
View 2 Replies
View Related
Oct 22, 2010
I have spent the last hour searching for a solution to this, but I can't get it to work. Here is what I am trying to do:
I have directories for different months in one folder. So for example Code: ../folder/Jan/
../folder/Aug/
etc. Some of the folders have a dot in front of the month as so: Code: ../folder/.Sep/
../folder/.Oct/
[Code].....
I am trying to find all the csv files EXCEPT those in a folder that has a dot. For example I want all the csv files in ../folder/Jan/ but I want none in ../folder/.Oct/.
I also want to exclude all the files in the /Aug/ folder that represent days 10-31.
Here is what I have so far: Code: find /some_path/folder/ ( ! -name "Aug[10-31]*.csv" ! -path "/.*/" -name "*.csv" ) | more This command lists all the .csv files except those in the /Aug/ files. So it just ignores the /Aug/ folder completely but lists every other .csv file.
View 3 Replies
View Related
Mar 9, 2011
Just installed Fedora 14. I wanted to try "Hello World" with perl. But where is it?
Code: [user]@user bin]$ ls
View 1 Replies
View Related
Jun 2, 2011
I am interested in a more flexible targeted search in my directories. For example, if I am searching for all .txt .dat and .bat files (then perform an operation), I would think that the following would work:
find . -name '*.{txt,dat,bat}' -exec ...
But I get no results. I am running on Cygwin.I have confirmed that:
find . -name '*.txt' -exec ...
find . -name '*.dat' -exec ...
find . -name '*.bat' -exec ...
all find the aforementioned files. But, find . -name '*.{txt}'still produces no output.
View 7 Replies
View Related
Dec 3, 2010
I am looking for some smart way to find all the exe's names for the given local function.
We are having thousands of C and Cobol files, and out of this we are creating 100's of exes. Now if I change any one of the function(C or Cobol), I want to know which exe's are going to be impacted.
One function written in some file can be called from lot other places, and create separate exes.
View 2 Replies
View Related
May 5, 2010
I'm using bash scripting to find any file that matches a path governed by the following regular expression:
"(monthly|nightly).[0-9]+/home/(user1|user2)/.mailbox/"
to match files like:
monthly.9/home/user1/.mailbox/l23131564
nightly.15/home/user2/.mailbox/cur/6546213
I've tried:
Code:
myRegex="(monthly|nightly).[0-9]+/home/(user1|user2)/.mailbox/"
find ./ -regextype posix-egrep -regex $myRegex
and it just spins and never gives me an answer, even though the file structure isn't that big.
View 8 Replies
View Related
Jan 6, 2010
I've been trying for days now to build my first FastCGI application using gcc.
This is the output:
Code:
I believe I wouldn't have to refer to the lib path, but I added the -L flag to be sure.
The directory /usr/lib includes (among others) these files:
Code:
I have tried to follow these instructions. The files in the tar.gz archive provided by FastCGI.com no longer corresponds to the instructions there, but I was still able to run the ./configure and make commands so I believe FastCGI is installed.
But why can not the library be properly linked to? Really hope you can help me out on this one!
View 2 Replies
View Related
Jul 3, 2011
I would like to know how can I find array length in C .I have array of structure and I want to sent it to different functions and I want to have it's length (number of elements) each time I want to use it and I don't like to use any additional variable to pass the function for each of arrays that I pass to function.
How can I do that?
View 5 Replies
View Related
May 28, 2010
I'm having problems figuring out the process to find directories that DO NOT contain a certain file. I have a mp3 collection that all the album art is name "folder.jpg". Not all the albums have images. I need a way to find the albums/directories that do not contain "folder.jpg". I can find the ones that do contain "folder.jpg" with
Code:
find . -iname 'folder.jpg' -print0 | xargs -0 ls >> album_art
but that is as far as my bash-fu can take me. I'm not really sure what my next step is.
My directory structure is like such: a-z/artist/album/folder.jpg
View 5 Replies
View Related
Mar 19, 2010
I wonder how CLI applications know the width of the terminal. For example, how does ls know how many columns to use?
How do package managers like pacman know what length to make the download progress bar?
Also, how do they redraw the progress bar in the same line?
View 11 Replies
View Related
Jun 15, 2010
Suppose from main(), multiple threads are created -
Now in main() I have all threads unique ID i.e. tid
If in each thread I call getpid, getgid etc it will get what it requested.
How unique thread_t tid relates to task_struct created of it in the kernel? (for each thread a separate task_struct is created).
If I have array of tid, and somehow I manage to get all the task_struct.
How to *MAP* each tid to corresponding task_struct?
View 2 Replies
View Related
Jan 23, 2011
Is there any way to find what is displaying in a terminal in C language?
I want to automate ssh login process, I know that I can use "expect" but I want to write another program in C myself.
In first ssh try to a host, ssh prints a message like this:
Quote:
The authenticity of host '192.168.30.1 (192.168.30.1)' can't be established. RSA key fingerprint is **** Are you sure you want to continue connecting (yes/no)?
and waits for an answer. I want to enter "yes" programatically when the message appears, but I don't know how to find if the message is appeared or not. In this case problem can be solved in another way, deleting the entry of the host from ~/.ssh/known_hosts before executing the ssh command, sleeping for one or two second and entering yes. Same problem exist for password prompt and this can be solved by sleeping, too.
But it is not a general solution and can be failed if prompts appear after entering required keys.
View 8 Replies
View Related
May 18, 2010
I am following a gtk2-perl tutorial, so I wrote the test program, installed gtk2-perl, and got this error:
Code:
Can't locate readonly.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.1 /usr/share/perl5/site_perl/5.10.1 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at ./test.pl line 7. BEGIN failed--compilation aborted at ./test.pl line 7.
I googled readonly.pm, and figured out it's part of some Readonly module.But how do I install it? Preferably using the Arch package manager?
View 10 Replies
View Related
Sep 16, 2010
I want to achieve the following result.
Find all the Pythagorean triples (a2 +b2=c2) where a,b,c are less than 1000. (a squared + b squared = c squared)
To achieve this goal. I created the following code.
#!/usr/bin/perl -w
for ($a = 1 ; $a < 1001 ; $a++)
{
for ($bi = 1 ; $b < 1001 ; $b++)
[Code]....
View 6 Replies
View Related
Nov 19, 2010
I have the following code and would like to copy all the found files within the if then loop.
Code:
I can pipe it to a file then run a smbclient get on the file listing but there must be a better way to do this.
View 4 Replies
View Related
Dec 1, 2010
I am familiar with C, C++, and Python at a novice level. I have recently tried learning bash, but I can't seem to wrap my head around it. My biggest problem, I think, is the huge "vocabulary"-- it seems like there are thousands of commonly used commands, and several ways to use said commands.I've done some google searches but can't seem to find scripting tutorials that tailor to n00bs. Most go from basic "Hello World" programs to very complex scripts.
View 5 Replies
View Related
Mar 17, 2010
Gidday, I'm puzzled as to why this works:
Code:
find /Data/ -type f -iname "*7pm*"
But this doesn't:
Code:
find /Data/ -type f -regex *7[Pp][Mm]*
I've tried MANY variations, but I'm getting no error messages, just no returns, and yet the first find, will find the sorts of files I'm looking for. I realise a win is a win, but I'm of the understanding that the -regex switch allows for some really complex use of regular expressions - but I can't even get a very simple one to work,
View 4 Replies
View Related
Dec 27, 2009
Code:
find . -name *.txt
Code:
find . -name *.txt
View 10 Replies
View Related
Jul 15, 2011
I'm testing some multi-plat java code and I'm getting a bit frustrated with the Linux tests. I need to run the command:
Code:
$ java -jar /home/developer/TCO/TabletComicOptimizer.jar <file> <args[]>
against all the files that match a specific criteria. I've tried various find syntax and I can't seem to get it right.
Normally I would just create a bash script and populate the results of find into an array and then just enumerate the collection but in this specific case I want to demonstrate this operation at the bash terminal.
I've tried things like:
Code:
~/TCO $ find . -type f -iname "*.cb[rz]" | xargs java -jar TabletComicOptimizer.jar {} 1200x1800 ;
Thinking that the {} is the substitution for each file returned by find but it's not working. How do I execute my java program against each result in the find operation?
View 6 Replies
View Related
May 20, 2011
I've just installed a nas on my system. All is ok apart from Kaffeine. It will play the file from the home dir, a usb disc but not for some reason the same file over the network located on a nas. It come up with the following error message:
The connection was configured as a MS Windoze network drive.via dolphin. No problems with compressed,pdf or doc files or copying etc just playing an avi with kaffeine.
View 1 Replies
View Related