2
votes
1answer
152 views

Attempting to insert characters via shell script bound to hotkey

I added the following to /root/.config/openbox/rc.xml: <keybind key="C-A-t"> <action name="Execute"> <command>/root/my-applications/test1.sh</command> ...
14
votes
1answer
8k views

How can I access a directory outside a chroot from within it?

I have a user which is chrooted to her home directory, but I want her to also be able to manage files within /var/www. As such, I did the following: root@server:/home/username# ln -s /var/www www ...
1
vote
1answer
2k views

busybox ash PS1 not expanding

I am trying to setup busybox's ash on an embedded system to support expanding the PS1 prompt statement. I have it currently set as PS1='\u@\h:\w\$ ' However, all that is displayed is literally ...
4
votes
3answers
848 views

Remove /var partition and replace it with /var into / (root) partition

I accidentaly created a /var partition and I'd like to get rid of it. Is it possible to remove this partition and use the / partition to contain /var without reinstalling the OS or do I have to ...
1
vote
1answer
138 views

How can I have cd show the directory it switches into?

I have made my command prompt ($PS1) to be just username.../current_directory (using the 3 dots because my directory structure has lots of levels and they were taking up too much of the command line ...
0
votes
2answers
7k views

How to add an IP to hostname file

I have a Centos 5.8 server. How can I add my server IP address 192.168.20.254 so that it reflects when I run the command hostname -i At the moment the command only shows the loopback IP 127.0.0.1 and ...
1
vote
0answers
116 views

ufs fails on debian

I am a longtime openSUSE user. However, my friend convinced me to give debian a try. When installing, I noticed there was no ext3 option (which I usually use), so I selected ufs. Then I got an ...
0
votes
1answer
1k views

How to setup SVN over VPN?

I'm looking on how to implement a SVN connection over a VPN on my CentOs server. I need to see up this VPN to work with the team in the office from outside. required packages ( yum ... ) ...
1
vote
2answers
1k views

CentOS, PHP file is running from browser, not from cron daemon

I am working on CentOS. I have created a PHP file which run from browser http://mydomain.com/backupfile/dobackup.php I have added the script from crontab and made the file executable, but it is ...
2
votes
1answer
478 views

How to associate only one public key with a restricted shell like scponly?

I'd like to use a passwordless key to perform e.g. unison synchronization while being able to SSH into the server only with a password-protected key. The usual way of using scponly is changig the ...
5
votes
3answers
2k views

How to get which version of cron daemon is running

Background: I am working on CentOS Details # cat /proc/version Linux version 2.6.18-308.4.1.el5PAE (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Tue Apr 17 ...
2
votes
2answers
79 views

Checking integrity of my server data

I want to make a log to detect the nature of intrusions into my Unix/Linux based server. For that I want to learn some tools like Open Source Tripwire and OSSEC. Please suggest to me similar tools. ...
1
vote
1answer
262 views

Mint 12 - Error updating MySQL (mysql-client-core-5.1)

I have MySQL 5.5 installed via packages.dotdeb.org. When trying to update 5.1, which is also installed, I get the following error: E: ...
1
vote
1answer
123 views

How to configure Emacs for literate programming?

I would like to use Emacs for literate programming. I want my code to look like this . <<class Hufftree definition>>= template<typename DataType, typename Frequency> class ...
4
votes
4answers
3k views

Make cp return an error value if the target exists

Is there a way to make cp (from GNU coreutils on Linux) return a nonzero value in case the target file does already exist? Or is there any other small utility which is commonly available and which ...
5
votes
1answer
909 views

Solaris 11 login banner

How do you add a (GUI) login banner in Solaris 11? I've done quite a bit of searching and have found many things on SSH and FTP banners/motd for remote logins, but not much for the local GUI login. I ...
2
votes
0answers
267 views

How to setup KVM partitions?

I'm trying to install SolusVM/KVM on a server with one 500 GB HD and one 256 SSD. I am a complete beginner at Linux. SolusVM has a script on the site to download and install automatically, but how do ...
2
votes
1answer
135 views

questions on find and grep

With respect to the following find command-line find . -type f -exec grep -l strings {} \; I do not understand the usage of -exec and {} \.
3
votes
2answers
993 views

Lower resolution of LVDS-0 in different aspect-ratio nVidia

I am trying to clone 2 displays. I have a laptop with 1440x900 resolution and an external monitor with 1024x768 resolution. I want the laptop screen to show the same as the external monitor however, ...
-2
votes
1answer
348 views

/opt/nvidia-smi from nvidia-drivers pack outputs “failed to load nvidia kernel module”

Actually I have nouveau string in make.conf. "Nvidia-smi has failed because it couldn't communicate with NVIDIA driver. Make sure that latest NVIDIA driver is installed and running."
2
votes
2answers
140 views

Parameter splitting

I have a bash script that is a simple wrapper around another process: $ cat ~/bin/s3cmd #!/bin/sh trickle -u 80 ~/bin/s3cmd.py $* $ This works great when the parameters don't contain spaces. ...
1
vote
1answer
222 views

Checking video card load via command line

Is there a command like cpustat or iostat or memstat, but for the video card? Or some indication in /proc or /sys?
2
votes
1answer
296 views

rsync redoing files?

I found rsync redoing files that have no modification. One file is >1gb so it takes a bit to do. My command is below. I'm running the command via ssh. The filesystem in question is a NTFS usb HDD to a ...
3
votes
1answer
384 views

Can emacs use gpg-agent in a terminal at all?

I understand that there are problems with getting pinentry-curses to work with emacs (see some of the comments on http://emacswiki.org/emacs/EasyPG), and so using emacs in a terminal isn't compatible ...
7
votes
3answers
3k views

bash - can I do : find … -exec this && that?

Is there a way to logically combine two shell commands that are invoked with find - exec? For instance to print out all the .csv files that contain the string foo together with its occurrence I would ...
0
votes
3answers
919 views

Sed find/delete for a string with multiple special characters recursively

I'm having quite a bit of difficulty with a complex string. A friend's site was hacked and has since been locked down but I'm helping to clean up the mess leftover and what I need to do is the ...
5
votes
4answers
2k views

A unix command to truncate each line of a file

I have a CSV file and I want to truncate it from the third semicolon. For example, if I have this file: 1;foo;bar;baz;x;y;z 2;foo;bar;baz;x;y;z 3;foo;bar;baz;x;y;z I want to get the following ...
3
votes
2answers
620 views

Limit stdout from a continuously running process

I haven't had much luck finding an answer to my problem, but maybe I'm not asking for it correctly. I have a process I startup like the following: nohup ping 127.0.0.1 > log.txt >2>&1 & ...
1
vote
2answers
382 views

How to find which files contain mentions of a wildcard image name?

What I am trying to do is do a search on my server to find which files contain mentions of images with a certain keyword in the filename but all I can figure out is how to find the filenams (not image ...
5
votes
4answers
4k views

Find largest files recursively

There seem to be a lot of entries about how to use du to recursively find the largest dir and files at the same time, but none on how to only recursively find the largest files in a set of ...
1
vote
0answers
49 views

Linux From Scratch: make no such file or directory, bad interpreter [duplicate]

Possible Duplicate: Getting “Not found” message when running a 32-bit binary on a 64-bit system I have finished the chapter 5 of the book. And after I entered the chroot I realized that ...
5
votes
3answers
896 views

Run ssh login command without modifying remote .bashrc

We have a bunch of servers set up with set -o vi in their ~/.bashrc. It would be nice to be able to ssh into these boxes and automagically run set -o emacs as a timesave. I've seen a solution ...
1
vote
1answer
652 views

mouse in gnome-terminal

how to set up mouse in terminal window? when i click on midnight commander captions i get raw data from mouse printed as characters in terminal and any running progs don't understand mouses clicks. I ...
1
vote
2answers
249 views

nme for linux target setup fails on debian

I'm trying to run haxelib run nme setup linux To set up NME for the Linux target on my Debian box. Actually Linux MINT Debian Edition, but that shouldn't matter. However, I get the following ...
0
votes
1answer
158 views

Can Bash Emacs shortcuts be enabled over SSH?

I find Bash keyboard shortcuts such as Ctrl-a (jump to start of line), Ctrl-k (cut text following caret), Ctrl-n/Ctrl-p (next/previous line in command history) immeasurably useful in day-to-day CLI ...
2
votes
4answers
19k views

Unix Command to return all files that end with single digit and TXT extension

Which command returns all files that end with a single digit and have the TXT extension ?
1
vote
1answer
86 views

Get rid of *~ files in KDE editors

All the KDE based editors (Kate, KWrite, Kile, etc.) tend to produce recovery (?) files that are named like the edited file with a tilde at the end. The annoying thing is that these files are left ...
0
votes
1answer
444 views

Where is avisplit? [duplicate]

Possible Duplicate: How to find out which (not installed) package a file belongs to? I usually used avisplit command to split avi files. I noticed that I should install the package ...
3
votes
3answers
807 views

Tar a file with a different name

To make my environment deployable, I occasionally tar up some handy files and scripts: tar -czvf env.tgz .vimrc .vim/ bin/lsl bin/s I would like to add .bashrc to the mix, but I have some sensitive ...
2
votes
1answer
2k views

Is there a way to report incorrect login attempts in Ubuntu 12.10?

I am concerned with some people trying to access my laptop while I am away in my work place. Therefore I was wondering if is there a way to set up kind of automatically monitor and report wrong ...
0
votes
1answer
588 views

Can't access /transmission

I have installed Transmission service on Centos. It is running. The problem is when I type myservername/transmission in my browser address it doesn't open. It was working before.
2
votes
0answers
357 views

PS command ouput limited to 80 bytes only [duplicate]

Possible Duplicate: How can I get a full process list in solaris, without truncated lines? The output of ps command only returns 80 bytes. Below is the text from manual pages of Solaris ps ...
3
votes
1answer
472 views

How can I get high-precision timestamps (better than 1s) with Samba?

I did a quick test and got the results below. Whats with the horrible time resolution? Is there a way I can make it better? creation 129971441605098285 mod 129971442166583272 a.ToFileTimeUtc() ...
7
votes
1answer
7k views

addgroup vs groupadd

I happen to know there is a slight difference between adduser and useradd. (i.e., adduser has additional features to useradd, such as creating a home directory.) Then what is the relation between ...
1
vote
5answers
2k views

Checking if a file exists in several directories

I've been working on this far too long and need some help. I need a script that will look at files in a directory and see if it exists in one of several directories. I need something like this: for ...
4
votes
2answers
212 views

What's the difference between “equery depends” and “equery depgraph”?

xi@localhost /usr/src $ equery depgraph gcc | wc -l 872 xi@localhost /usr/src $ equery depends gcc * These packages depend on gcc: app-admin/eselect-python-20100321 (>=sys-devel/gcc-3.4) ...
12
votes
4answers
8k views

How can I kill and wait for background processes to finish in a shell script when I Ctrl+C it?

I'm trying to set up a shell script so that it runs background processes, and when I Ctrlc the shell script, it kills the children, then exits. The best that I've managed to come up with is this. It ...
3
votes
1answer
1k views

Linux disk I/O performance issue — what config options to look at?

We discovered an I/O related performance problem when using the default SLES11 SP2 kernel. Our same application on the same hardware had no issue with (the admittedly ancient SLES9 SP3). We had a ...
6
votes
2answers
4k views

Removing Color Codes From Output [duplicate]

Possible Duplicate: Removing control chars (including console codes / colours) from script output I'm working on a script to work alongside a program that I'm writing. What i'm trying to do ...
1
vote
2answers
395 views

Easiest way to find/replace in a file using a list?

I have a file, foo.txt, and a regexp I want to find in that file. Each time I find the regexp, I want to take a line from another file, bar.txt, and substitute it in for the regexp match I found in ...

15 30 50 per page