3
votes
6answers
4k views

Renaming multiple files based on their contents

How can I rename all files within a folder with the first word of their content? For example if a.txt contains “Unix is an OS” in its first line then a.txt should be renamed to Unix.txt
2
votes
2answers
260 views

Is there a OS/user-wide log to log to?

I'm using curl to dowload a jar from a TESTDRIVE script and for debugging purposes it helps to log the http headers returned to a log file. But logging them in the working dir (where the script is ...
3
votes
5answers
4k views

Rename all the files within a folder with prefix “Unix_”

Rename all the files within a folder with prefix “Unix_” i.e. suppose a folder has two files a.txt and b.pdf than they both should be renamed from a single command to Unix_a.txt and Unix_b.pdf
0
votes
2answers
476 views

Ruby and Git refuse to update. (Mac)

I've been trying to update Git for a while. I'm currently stuck on 1.7.3.4, and I've tried updating to 1.7.4.x, and 1.7.5.x but it never works. Today I compiled and installed Ruby 1.9.2, but it still ...
2
votes
1answer
702 views

Which Repository do I add to install Gnome 3 on Fedora 14

I can't seem to find this anywhere. Also is there a list of repositories for third party software apart from livna? and is there a better package manager like Ubuntu's for Linux?
3
votes
1answer
591 views

What is the best way to manage users across multiple servers

I am inheriting about 20 linux servers running different versions of Ubunutu (7 and above). The current setup has people logging in(ssh) with a shared login (it was explained to me that this was done ...
2
votes
1answer
758 views

How to specify the media directory in MediaTomb

I have mediatomb in ubuntu. I have started it with "sudo service mediatomb start", and its process shows in ps. But in the config I cant find where to specify the media directory. I searched the web ...
4
votes
2answers
3k views

In bash, how to convert 8 bytes to an unsigned int (64bit LE)?

How can I 'read/interpret' 8 bytes as an unsigned int (Little Endian)? Perhaps there is a Bash-fu magic conversion for this? UPDATE: It seems that something got cross-wired in the interpretation of ...
1
vote
2answers
141 views

How to display the server time inside Vim

I want to know how to display the server time inside the Vim editor, if possible.
3
votes
1answer
1k views

A Live CD distro for getting data off a NTFS partition without X Windows

The Windows partition on my laptop seems to refuse to boot, and since I lack the original install CD, I was thinking of installing my preferred Linux distro, Arch on it. I want to recover data off ...
1
vote
1answer
143 views

How to bash-complete output of two arbitrary commands at the same time

Here goes: function _command() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} if [ "$COMP_CWORD" -ge "2" ]; then COMPREPLY=($( compgen -W '$(pwd)' -- "$cur" ) ) ...
3
votes
1answer
1k views

Does ie4linux work under Fedora?

I'm trying to install ie4linux, following this tutorial root yum install wine cabextract normal user wget -q http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz tar xfz ...
2
votes
1answer
554 views

Installing Pencil on openSUSE

I have installed openSUSE 11.4 today and I am trying to install Pencil on it. I downloaded the ArchLinux tarball from the site, and after extracting it, the pencil.sh file didn't install, giving a ...
1
vote
1answer
90 views

Is there a way to bind TAB so that it outputs 2 space characters?

Is there a way to bind TAB so that it outputs 2 space characters? I know you can do this in a text editor like Vim, but I wanted to carry over this functionality to cat >>.
4
votes
2answers
6k views

Output progess of the scp/sftp command to both standard out and a file on linux server

I am writing a release script, which uses scp/sftp to get the the file from a remote server, we want to log the output of this script to a release.log file as well. I am using "tee" to achieve this, ...
2
votes
1answer
274 views

less -j is not working for me

less -jn where n is a line number to jump to is not working for me. It just has no effect. I'm running less version 436 on Ubuntu 11.04. I also tried less --jump-target=200 and LESS='-j200' less ...
7
votes
2answers
4k views

GPGPU/CUDA in KVM or Xen

We would like to enable direct access to CUDA-enabled GPUs within either KVM or Xen (or Citrix Xenserver). Specifically, we want to use PCI passthrough to access an NVIDIA Tesla S2050 unit, which is ...
12
votes
3answers
625 views

Why do we need the reboot function in different binaries?

Why do we need the reboot function in different binaries? shutdown -r and reboot Or do they differ in something?
3
votes
3answers
3k views

How to request a hostname from a DHCP server on Ubuntu?

I have an Ubuntu 11.04 server virtual machine. I would like to request a specific hostname from the DHCP server at the office. Since I don't run it often, the IP changes nearly every time that I boot ...
0
votes
2answers
67 views

Where can I find a list and documentation for samba share definitions?

I'm looking for a reference for what goes under the share name... I feel like there are about 6 dozen different options but I can't find a good reference anywhere... someone help me out? [myshare] ...
0
votes
2answers
126 views

where on the filesystem do user-generated system scripts go?

I have a couple command line php scripts and also php pages that call the same class file. Instead of having mutiple copies of it floating around, I want to put class.myApi.php in one central location ...
2
votes
2answers
244 views

Should all plain text files have some sort of suffix (e.g. *.txt, *.conf) [closed]

I create many notes in plain text files, but after a while the .txt suffix I put at the end of them seems to be unnecessary typing and visual noise. Is appending .txt to plain text files a strongly ...
10
votes
6answers
6k views

What does the “number” in the owner field of files signify in linux?

I copied many files to my new linux host. I see that all files have the owner and group both set to 515. What does that mean?
24
votes
3answers
60k views

Add/update a file to an existing tar.gz archive?

Is there a way to add/update a file in a tar.gz archive? Basically, I have an archive which contains a file at /data/data/com.myapp.backup/./files/settings.txt and I'd like to pull that file from the ...
5
votes
2answers
697 views

Sync files from a mac to a flash drive - automatically?

I have a flash drive, let's name it FLASH. I want, when on my mac, when FLASH is plugged (and automatically mounted), execute a specific script and make ~/Documents to be automatically copied to ...
1
vote
2answers
1k views

how to create debian package to install files to /home/user

I created a debian package, I want to install the files to the directory /home/user/myapp instead of /usr/bin but after install the deb, the owner of /home/user/myapp is root I hope after install ...
26
votes
4answers
6k views

Is there a way to communicate with someone at their desktop?

My wife is sitting at her home desktop, alpha, which is running a recent version of Ubuntu. I am on a bus, using ConnectBot on my G1 phone, and can SSH into alpha from wherever I am. For complicated ...
3
votes
1answer
2k views

Are there any MathType clones for Open/Libre - Office?

Are there any OpenOffice.org/LibreOffice equation editor/makers, similar to MathType?
4
votes
1answer
2k views

Batch copy and rename with regexp

I am wondering whether there is a way how to copy and rename a bunch of files without scripting. I have files with names like prefix_12345678901_12345678901_suffix.ext and I need to copy all of them ...
1
vote
1answer
197 views

Mass update of /etc/ldap.secret

I have a group of servers authenticating against an LDAP server. I would like to be able to periodically update the /etc/ldap.secret file with an updated secret. I've written a small script that reads ...
11
votes
2answers
4k views

Update only one package with pacman

Is there a way to update only selected programs in pacman? I'm running ArchLinux on my netbook, and the complete upgrade of my system takes up more temporary space than I have on my system, so I'd ...
2
votes
2answers
1k views

SFTP with Mysql user pass instead of PAM

Is there a way for people to log onto a debian server via sftp using just mysql database table as authentaction. IE not adding a user to the system? I know it can be done over ftp and TLS but i ...
2
votes
1answer
330 views

Change size of system console as user

At uni, I'm using a terminal to log into a text console of some unix server. As the monitors are 17" and the console is displayed full screen, it's a bit annoying to look at the screen with the ...
5
votes
2answers
237 views

Finding session information about Firefox

I'm currently developing a piece of software whose functionality is dependent upon knowing the state of the current Firefox session running on the user's Ubuntu computer. The information it will need ...
6
votes
2answers
21k views

Format of /etc/hosts on Linux (different from Windows?)

Pasted below this question is a sample of a /etc/hosts file from a Linux (CentOS) and a Windows machine. The Linux file has two tabbed entries after the IP address (that is localhost.localdomain ...
2
votes
4answers
862 views

How to generate jpg thumbnails and browsable html pages from command line?

I am searching for a simple command line tool that takes a bunch of jpg files as input, copies them to some destination and generates some browsable html for it (including index page, preview ...
5
votes
1answer
115 views

Search for a text in Linux but don't display the complete line in results

I'm using grep to do this, like: grep someText file.log But this returns the complete line in results. If someText is found in the middle of a line I don't want to ouput the whole line, just the ...
1
vote
1answer
1k views

BTX loader manual

I Can't find any good manual/reference about BTX bootloader integrated into FreeBSD. Especially I would like to know: if it's functionality resembles GRUB 2. For example, if it can boot OS other ...
2
votes
2answers
295 views

Divorced input line in GNU Screen

Is it possible to divorce my input from the overall shell using Screen? What I'm aiming for is akin to a status line that expands if I type more than would fit within a single line and is ...
0
votes
2answers
172 views

symbolic link to a large file

I have a large(1 TB) file that I would like to download from the centos server via http, should I create a symbolic link to the file to the http file directory? would the link work? the file is too ...
4
votes
1answer
2k views

How can I automatically restart gnome-shell coming out of suspend mode?

So, due to an issue with gnome-power-manager, gnome-shell, and my nvidia card, I'm left in the awkward position of coming out of suspension/sleep with my graphics broken. This problem resolves itself ...
2
votes
0answers
308 views

System beep not working in TigerVNC

I just upgraded my Gentoo Linux computer (where I'm running Xvnc from TigerVNC 1.0.90 (1.1 beta 1) compiled myself against xorg-server 1.9.5), and I'm no longer getting any bell sounds, just silence. ...
1
vote
2answers
665 views

Socksify like program for Fedora?

I need a program that allows me to pass an application through a socks server, even if the program does not have native socks support. Under Ubuntu I can use socksify for this. What can I use under ...
10
votes
1answer
7k views

Description of kernel.printk values

Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value ...
9
votes
1answer
796 views

Log every invocation of every SUID program?

I would like to have a log file that contains an entry for every time a user runs any suid program, containing the user name, the program and any command line arguments passed to it. Is there a ...
3
votes
1answer
3k views

auto accepting rsa key in bash script

I have done a little googling and have not come up with a clear answer to this question. I was wondering if someone could help me out with this issue. Is there a way to auto accept any RSA key inside ...
5
votes
1answer
4k views

Dollar sign interpolation inside quotes in bash

I am running this little test script I wrote : #!/bin/bash TESTCASE=$@ testHarness <<runTest $TESTCASE runTest from the command line : ./test.sh "1092$212" but the dollar sign is being ...
5
votes
1answer
1k views

Gnome 3 Software Center

Just installed Fedora 15 with Gnome 3. Is there like a software center like in Ubuntu?
5
votes
2answers
6k views

loop curl get request bash

I'm trying to automate a curl script and eventually make it loop also. I found that I can't use any loop like: for i in `cat authors` do curl *line here* ...
4
votes
1answer
461 views

Block keyboard on debian

I would like to block the keyboard for a kiosk-based application implemented on Linux. The keyboard could be blocked with "nohup cat /dev/tty0" on some Linux distributions, but it's not working on ...

15 30 50 per page