The only way I know is:
find /home -xdev -samefile file1
But it's really slow. I would like to find a tool like locate.
The real problems comes when you have a lot of file, I suppose the operation is O(n).
...
Is there any resource or book for creating own linux distro.Only good resource i found is this
And also what specialities need to start project like this?
...
How can I built my own document viewer using swftools like simpleviewer.swf.
...
I have a simple c++ application that generates reports on the back end of my web app (simple LAMP setup). The problem is the back end loads a data file that takes about 1.5GB in memory. This won't scale very well if multiple users are running it simultaneously, so my thought is to split into several programs :
Program A is the main exec...
Pre-compiled headers seem like they can save a lot of time in large projects, but also seem to be a pain-in-the-ass that have some gotchas.
What are the pros & cons of using pre-compiled headers, and specifically as it pertains to using them in a Gnu/gcc/Linux environment?
...
I have a select call that doesn't seem to detect characters on the serial port. Is there anything I am missing?
If I remove the read() code that is in the block above the select will return for a while until the existing port buffer is emptied and then nothing more is detected.
I am streaming characters to the port, and running mini...
I use Linux because it is a superior development environment to Windows. However I recently came across a Windows library called AHK that gives me great control to interact with applications.
Is there an equivalent in the Linux world?
...
I can build a executable with gcc with static link:
gcc -static xxx.c -o xxx
So I can run xxx without any external dependent library.
But what if I want to build shared library without externel dependent library? which I mean I want
the shared library statically linked its externel reference in.
...
Hello,
I hit Linux's 32,000 subdirectory limit. It caused problems with my PHP scripts and I don't want it to happen again.
The simple solution is to have my PHP scripts check the current subdirectory count before trying to create another subdirectory.
All ideas I've seen to perform such a check involve iterating over the entire dire...
I have written a shellscript which tries to pull a tar file from an ftp server and untar it locally. I need to extract specific files from the tar archive. The filename of the tarfile contains a date; I need to be able to select a tar file based on this date.
abc_myfile_$date.tar is the format of the file I am pulling from the ftp serve...
Except http://us3.php.net/manual/en/book.ktaglib.php and http://getid3.sourceforge.net/ does anyone know of any other way to work from PHP with tags on audio files?
I need to read and write them, and KTagLib seems a little too much for the job, and also don't really get the documentation, and getID3 seems to only write ID3v1 tags.
...
I did a voice recorder applet and deployed in Apache Tomcat server.
In Windows I tested the URL (http://localhost/Sound.html) in Firefox and IE; it's working fine.
But the same applet is not loaded in Safari browser in Linux.
I have signed the applet too. What might I be doing wrong?
...
Ok, so here's the thing. I need to read the output (the one that you usually see in a linux console). My biggest problem is that I don't need to read the output of a linear execution, but something rather like wget http://ubuntu.com/jaunty.iso and show its ETA.
Also, the work-flow is the following:
S - webserver
C1 - computer1 in S's ...
I'm using the g_file_storage gadget in Linux to export a partition as a removable USB mass storage device to host PC's (Windows, Linux, MAC).
All of these host OS's (can) automatically mount the removable disk and access it without issues, and I'm looking for a way to detect that the host has ejected/unmounted the disk.
The only way I...
Hello all,
I am wondering how does stat command calculate the blocks of a file. I read the
article, it says:
The value st_blocks gives the size of the file in 512-byte blocks. (This may be smaller than st_size/512 e.g. when the file has holes.) The value st_blksize gives the "preferred" blocksize for efficient file system I/O. (Wri...
I want to link ( ln -s ) all files that are in /mnt/usr/lib/ into /usr/lib/
There are lots of file, how to do it fast? :)
...
I want to use this to get data from row out of mysql database into text files (one entry under another, 50 entries per file):
$ mysql --user=XXX --password=XXX --batch --skip-column-names \
-e "SELECT userid, displayname FROM Users" stackoverflowdb | \
split -l 50 -a 5 - "result."
but I also don't want to copy duplicate entries to th...
Has someone maybe a good source where all available file operations like fopen, fread, mkdir, etc are described? When I am googleing for Linux file operations most pages explain me how the filesystem hierarchy looks like.
...
I need to control inbound and outbound traffic to/from a linux box from within a C++ program. I could call iptables from within my program, but I'd much rather cut out the middle man and access the kernel API functions myself.
I believe I need to use libnfnetlink, however, I have not been able to find any API documentation or example p...
hi
i am using this exec("du -sh -S ".$fileFlv.""); command in php to get size of a file all the things works fine but the problem at my end is i want only the size but it dispalys the size as well as name of the file
...