I am running a PHP script that gets me the absolute paths of files I want to tar up. This is the syntax I have:
tar -cf tarname.tar -C /www/path/path/file1.txt /www/path/path2/path3/file2.xls
when I untar it create the absolute path to the files. I do I get just /path with everything under it to show?
...
I'm building a Web2Py-based web application and am doing most of my development right on a remote EC2 development server. I would like to version control the entire system, including all python modules, web pages, and Apache config files. The files are obviously scattered across my Linux box, but I would like to be able to checkout/com...
i'm looking to optimize a wordlist for the english language using sed or a similar linux application.. in order to do this i need to:
Remove lines containing anything except a-z, 0-9, or special characters
Remove urls - maybe detection of the "\" character
Remove lines over 16 characters long, and 4 characters or shorter. (5-16 chars...
Hey Guys
We have a big problem. At present we are accessing a serial port via the following hooks
fd = open( "/dev/ttyS1", O_RDWR | O_NOCTTY )
then we read from it using the following chunk of code
i = select( fd + 1, &rfds, NULL, NULL, &tv )
.
.
.
iLen = read( fd, buf, MAX_PACKET_LEN )
the problem is that before we read, we need t...
It is mentioned in ftok() manual
key_t ftok(const char *pathname, int proj_id);
The ftok() function uses the identity of the file named by the given pathname (which must refer to an existing, accessible file) ...
I am confused about const char *pathname.
What would be the best practice for it?
On my current system I can pass "...
Suppose I'm at revision 50.
But, I want to revert back to revision 45, and commit back as the stable version.
How do I do that, in the most simple way?
What if I want to do that with one file?
What if I want to do that with the entire repository?
...
My files have this "invisible arrows"
How do I disable this completely?
--->--->--->---
This is my vim config. What do I have to change to do this?
set nohlsearch
set ai
set bg=dark
set showmatch
highlight SpecialKey ctermfg=DarkGray
set listchars=tab:>-,trail:~
set list
autocmd BufRead *.py set smartindent cinwords=if,elif,else,f...
I wrote a function that copies the /etc/skel directory on a linux machine during a "create new user" RPC call. Now, there is quite a few things about this I want to test, for example the files in /etc/skel and the targets of symlinks should not have changed permissions afterwards, whereas the copied files including the actual symlinks sh...
How can I dump symbols in .la file on Ubuntu Linux?
I get this linking error:
main.c:(.text+0xbfb): undefined reference to `Browser_new'
And I think my main.c is linking against libwebkit-1.0.la. So how can I find out if libwebkit-1.0.la has the symbol 'Browser_new'?
CXXLD libwebkit-1.0.la
CCLD Programs/GtkLauncher
...
I want to write an application to video capture from web-cams in linux. Is there a python library to do that?
...
I have developed fuse fs with python and now want to write tests for it. Before testing I mount fs to some dir:
fs = MyFuseFS()
fs.parse(errex=1, ['some_dir'])
fs.main()
After testing I want unmount my fs, want to do something like this:
fs.unmount()
Is it something like "unmount" method? Maybe there is another ways...
I have checked a file temp.pl but now i want to change into temp .
I have tried cvs rename temp.pl temp
but its not working
How to rename checked file in cvs ?
...
I've just upgraded my server to version 9.3 of plesk from parallels. Now all my joomla sites ( and others) are showing a
Warning: realpath() [function.realpath]: Unable to access / "file location" error.
Any ideas what I can do to resolve it??
thanks
...
Hi,
I am writing a client using libsoup APIs.
I have done the following.
`session = soup_session_sync_new();
msg = soup_message_new("GET","http://www.google.com");
status = soup_session_send_message(session,msg);`
However now i am getting the following error code in status. I print the reason phrase and it says the status= 4 , msg-...
-not sure if this belongs here or on serverfault-
What I want to do it list all directories in a directory and delete all of them, except for the last 5. We have a deployment system in place that will incrementally do something link this:
/var/www/html/build1
/var/www/html/build2
/var/www/html/build3
/var/www/html/build4
/var/www/html/...
Hi all,
I've a directory with many number of 0 byte files in it. I can't even see the files when i use the ls command. I'm using a small script to delete these files but sometimes that does not even delete these files. Here is the script:
i=100
while [ $i -le 999 ];do
rm -f file${i}*;
let i++;
done
Is there any other way to d...
hi i have installed ubuntu 10.4 as guest OS on vmware and windows xp is my host.
now i want do know does vmware give a new ip address to the linux os.. if yes how do i get that ip address
...
It seems that most 32 bit applications will run on 64 bit linux assuming all the 32 bit libraries are present. But it seems to me there could be issues with architecture-dependent functions, and here I'm thinking of signals and setjmp/longjmp. I'm wondering if someone with greater experience could comment on what functions (if any) woul...
Ok I am running CentOS, with PHP 5.2. I recently added the JSON extension. When running
php -i
.. after installing JSON, it says
json
json support => enabled
json version => 1.2.1
But when I run phpinfo it's not showing the JSON extension as being enabled. I have added the extension to the php.ini file so it loads the json.so file...
This is maybe unusual so let me set the scene:
We have an SVN repo containing our project history - an embedded system based on Linux. The SVN repo contains Linux kernel, U-Boot, busybox etc. sources and all our in-house apps, filesystem and such.
The Linux kernel we have is old and crusty and I am working on porting to the mainline, w...