I'm using grep to generate a list of files I need to move:
grep -L -r 'Subject: \[SPAM\]' .
How can I pass this list to the mv command and move the files somewhere else?
Hi everyone,
Im trying to make my own debian distribution but I have a problem.
simple-cdd works fine but when I try to install my generated .iso, everything goes right since a message apears:
"
No installable kernel was found in the defined APT sources
You may try to continue without a kernel. and manually install your kernel later. This is only recommended for experts, otheriwse you will likely end with a machine that dosent boot.
COntinue Without installing a kernel?
"
And if y say yes, it continues...
When is time to install grub it says:
" Installation step failed
An installation step failed. You can try to run the failing item again from the menu, or skip it and choose something else. The failing step is: Install the GRUB boot loader on a hard disk
"
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I have a version of SVN on my system in /usr/bin/svn. This is too old to use with some repositories so I compiled a newer version in /home/user/built/bin/svn which works fine. I added this to my PATH so it should be run first.
Typing
which svn
produces
/home/user/built/bin/svn
however typing
svn --version
reveals that it us using the old version still. if I run
/home/user/built/bin/svn --version
then the correct version is displayed.
Since the custom version is first in my $PATH, and which lists it first why is the older version being invoked when I run svn? I thought which used your $PATH to find executables in the same fashion as the shell?
[Edit] Type gives:
type svn
svn is hashed (/usr/bin/svn)
Is this the problem?
When consulting bash's man page, it read this sentence about bash history:
The second and subsequent lines of a multi-line compound command are
not tested, and are added to the history regardless of the value of
HISTCONTROL.
But I have tried this:
$ HISTCONTROL=ignorespace
$ if [ -f /var/log/messages ]
> then
> echo "/var/log/message exists."
> fi
$ history | tail -2
18 HISTCONTROL=ignorespace
19 history | tail -2
Note that the if is leaded by a space. Why the second line of this if compound command still not appear in the history?
I have a daemon writing to a log file that, eventually, fills up the disk. Is there a way for me to periodically limit the size of the log file without stopping the daemon without changing the code in it? SIGHUP kills the daemon.
When I run my python script in the shell terminal, it works
sudo myscript.py --version=22 --base=252 --hosts="{'hostA':[1],'hostB':[22]}"
But when I run in Hudson and Jenkins, using Execute Shell step, somehow, the string --hosts="{'hostA':[1],'hostB':[22]}" is interpreted as
sudo myscript.py --version=22 --base=252 '--hosts="{'hostA':[1],'hostB':[22]}"'
How do we overcome this so that our script would run in Jenkins and Hudson ?
Thank you.
Sincerely
You usually invoke the following commands to build a ./configured product:
make
make install
Okay, the product is in the system now. Then you change some source code files and invoke only make install. The question is, does the conventional implementation of install target requires the executables to be recompiled, or just the old ones should be copied to the appropriate system path?
I am working with a file upload script. I am currently uploading a file and then trying to echo out an anchor linking to that file, but since I used mkdir() with 0700 permissions to upload the file, it won't allow me access to view the file.
I am pretty sure the problem I am experiencing is because of the file permission code I used. The problem is I just don't know what all the different file permission codes are and what they mean.
Can somebody please list out all the different file permissions and what they each do?
I have a classifieds website, and users may post classifieds, add images, remove classifieds etc etc...
I have no idea what to set the permissions to on folders.
For instance, a php script which I have uploads a file to a directory.
What would you have set the directory permissions to?
Nobody need access to the directory, only the php script...
Just wonder if anybody has a good (brief) article about setting the "right" permissions?
Thanks
Is there a command to tell compiz that we want to bring in front and set focus to a specific window?
How should we identify the window in that command?
The reason behind this question is the following use-case:
Suppose we have a wiki to keep notes of anything interesting we find out. It would be very convenient to have a keyboard shortcut to bring the browser window with our Wiki page in front and start typing immediately then with another key combination switch to the application we were working before
I know that "ALT+TAB" switches between the last two used windows but cannot support more complex combinations of applications. E.g Browser+Eclipse+ Wiki
If there is a command like the one described, it is easy to add a shortcut to it from KDE or GNOME interface
Thanx ...
i would like to automate the rsync task as a cron job.. since it needs the passphrase i am not able to do the cronjob. i need to specify the passphrase along with the rsync command or i will store the passphrase in a file and i will read from it. my command will look like this..
rsync -aPe "ssh -i ' . $server-{'ssh_key'} . '" ' . $server_lock_dir;
so where do i put the password .. pls help
I have always done this:
mysqldump -hlocalhost -uuser -ppass MYDATABASE > /home/f/db_backup/MYDATABASE.sql
mysql -uuser -ppass MYDATABASE < MYDATABASE.sql
But, if I do this instead...is this safe? Is this identical to the above???
mysqldump -hlocalhost -uuser -ppass MYDATABASE | gzip > /home/f/db_backup/MYDATABASE.sql.gz
zcat MYDATABASE.sql.gz | mysql -uuser -ppass MYDATABASE
My Windows application runs under Wine, but the installation is a bit of a headache for laymen, and the wrappers I've seen online (PlayOnLinux, Wine Doors) require even more packages to be installed. Is there a way to make a package that will install Wine if the user needs it to be installed, install the application and shortcuts, all with minimal user hassle?
hi,
consider a kernel tasklet scheduled and executing the tasklet function.
Is there a way to know which core the tasklet is running ?
I mean is there a function / variable to know at which core the tasklet is running at.
Architecture is arm.
Thanks!
Ho to insert cookies value in curl? from firebug "request headers" i can see in the following "Cookie: PHPSESSID=gg792c2ktu6sch6n8q0udd94o0; was=1; uncheck2=1; uncheck3=1; uncheck4=1; uncheck5=0; hd=1; uncheck1=1"
I have tried the following:
curl http://site.com/ -s -L -b cookie.c -c cookie.c -d "was=1; uncheck2=1; uncheck3=1; uncheck4=1; uncheck5=0; hd=1; uncheck1=1" > comic
and the only thing i see in cookie.c is
PHPSESSID=gg792c2ktu6sch6n8q0udd94o0; was=1;
I use the functions fork(),exec()...
But how can this program compiled without including some extra headers(like sys/types.h, sys/wait.h).
I use ubuntu 10.04 with gcc version 4.4.3
#include <stdio.h>
#include <stdlib.h>
int main()
{
pid_t pid;
printf("before fork\n");
pid = fork();
if(pid == 0)
{
/*child*/
if(execvp("./cpuid", NULL))
{
printf("error\n");
exit(0);
}
}
else
{
if(wait(NULL) != -1)
{
printf("ok\n");
}
}
return 0;
}
Every x minutes I grab an image from a network-cam. Now i want to add this picture to an existing video file - on the fly.
I don't want to keep numerous image files and then encode them once in a while with e.g.
mencoder mf://@${LIST} -mf type=jpg:fps=${FPS} ...
The video format/codec doesn't really matter, as long as standard tools (mplayer, ffmpeg, vlc, ...) can handle it.
Any ides or suggestions?
Thanks in advance!
Application scenario:
I have the (normal/permanent) /var/log mounted on an encrypted partition (/dev/LVG/log). /dev/LVG/log is not accessible at boot time, it needs to be manually activated later by su from ssh.
A RAM drive (using tmpfs) is mounted to /var/log at init time (in rc.local).
Once /dev/LVG/log is activated, I need a good way of appending everything in the tmpfs to /dev/LVG/log, before mounting it as /var/log.
Any recommendations on what would be a good way of doing so? Thanks in advance!
I have a sip configuration file which looks like this:
[1664]
username=1664
mailbox=1664@8360
host=192.168.254.3
type=friend
subscribemwi=no
[1679]
username=1679
mailbox=1679@8360
host=192.168.254.3
type=friend
subscribemwi=no
[1700]
username=1700
mailbox=1700@8360
host=192.168.254.3
type=friend
subscribemwi=no
[1701]
username=1701
mailbox=1701@8360
host=192.168.254.3
type=friend
subscribemwi=no
For each record I need to add another line (vmxten for each record) for example the above becomes:
[1664]
username=1664
mailbox=1664@8360
host=192.168.254.3
type=friend
subscribemwi=no
vmexten=1664
[1679]
username=1679
mailbox=1679@8360
host=192.168.254.3
type=friend
subscribemwi=no
vmexten=1679
[1700]
username=1700
mailbox=1700@8360
host=192.168.254.3
type=friend
subscribemwi=no
vmexten=1700
[1701]
username=1701
mailbox=1701@8360
host=192.168.254.3
type=friend
subscribemwi=no
vmexten=1701
What would you say would be the quickest way to do this? there are hundreds of records in the file, therefore modifying all of the records by hand would take a long time.
Would you use Regex? Would you use sed? I'm interested to know how you would approach the problem.
Thanks
[root@jiaoyou ~]# test 1 = 1 -a 0 = 1
[root@jiaoyou ~]# if [1 = 1 -a 0 = 1]then echo 1;else echo 2;fi
-bash: syntax error near unexpected token `else'
Why test doesn't give any output and the if statement fails?
Can someone point out what's wrong here?
I'm new here same as I'm new with assembly. I hope that you can help me to start.
I'm using 32bit (i686) Ubuntu to make programs in assembly, using gcc compiler.
I know that general-purpose-registers are 32bit (4 bytes) max, but what when I have to operate on 64 bit numbers? Intel's instruction says that higher bits are stored in %edx and lower in %eax
Great...
So how can I do something with this 2-registers number? I have to convert 64bit dec to bin, then save it to memory and show on the screen.
How to make the 64bit quadword at start of the program in .data section?