4
votes
3answers
5k views

using stat to provide timestamp for touch

Am trying to OCR some documents insitu (from a linux command line on a windows share). The process of OCRing is find and I have muddled through using the find command to pipe the files through the ...
4
votes
2answers
9k views

Where is the system profile that gets sourced at login on CentOS 5.8?

In CentOS release 5.8 (Final), where is the bash system profile? Is it /etc/profile ? I've added the following to source my ~/.bashrc file but haven't had any luck as it fails. I know it fails ...
9
votes
1answer
595 views

MySQL gets killed by OS every 25 days or so

About 4 months ago we migrated from MS SQL Server to MySQL 5.5. Since then we have been experiencing an issue once approximately ever 25 days since where CentOS runs out of memory and as a result it ...
1
vote
1answer
807 views

Multiply certain numbers in a text -file by certain constant

I want an alternative solution to this jQuery hack, tasting a bit reinventing the wheel -- look I am sure I could do this with some one-liner using basic *ix tools. Look much easier and ...
1
vote
1answer
2k views

How to enable dual booting option at boot screen?

I have two hard drives, 160GB and 500GB. On the 160GB I have installed RHEL 6 and on the 500GB, Windows 7. When I start, the hard drive which is set as primary is booting directly. I have set the ...
1
vote
2answers
6k views

Mount Windows phone as a removable device

I know that the Zune software doesn't work with Linux of any kind, but I found a guide here that shows how to change regedit in Windows to use the phone as a removable device with direct access to the ...
4
votes
2answers
205 views

Why are parameters to Bash's `command` and `type` optional?

Similar to Why are parameters to Bash's builtin optional?, these commands print nothing and return exit code 0 if no parameters are provided. But unlike builtin, their help output state that at least ...
4
votes
1answer
299 views

Why are parameters to Bash's builtin optional?

Running simply builtin prints nothing and returns exit code 0. This is in accordance with help builtin, which shows all parameters as optional. But why isn't this no-op an error? Is there a use case ...
2
votes
1answer
4k views

How to make a program/process a service ?

I wonder how can I make a regular application like for instance noip2 updater a system process. I use Debian 6.0.2. For now I have it like this : the binary is in the /usr/local/bin/ as noip2 file ...
2
votes
1answer
4k views

Display all network interfaces on Solaris

On Linux, the command mii-tool displays the list of Ethernet interfaces and other information. What equivalent command existson Solaris? My goal is to view all LAN networks that my Solaris machine is ...
12
votes
2answers
953 views

When to use a semi-colon between environment variables and a command

Can anyone explain why the semi-colon is necessary in order for the LANG to be seen as updated by bash? Doesn't work: > LANG=Ja_JP bash -c "echo $LANG" en_US Works: > LANG=Ja_JP ; bash -c ...
2
votes
2answers
525 views

Disable autoscrolling in gnome 3.4

I've recently updated my gnome to 3.4 and a problem appears. When I start scrolling, scroll never ends and even continues to scroll when I switch to another window. How can I disable this annoying ...
9
votes
2answers
6k views

Is there a way to detect null bytes (␀, NUL, \0) in sed?

Related to another question, in order to fuzzily detect binary files, is there a way to detect ␀ bytes in sed?
7
votes
3answers
1k views

Change the color of the file name text

I am writing scripts to initialize and configure a large system with many components. Each component has its own log file. I would like to change the color of the component file name to red whenever ...
6
votes
1answer
5k views

Find which files are affected by bad blocks on ext4 filesystem

I have an ext4 filesystem that recently developed some bad sectors. Running fsck.ext4 -c finds and remembers the bad blocks. How can I find which files (if any) included these bad blocks so I can ...
2
votes
2answers
3k views

My debian-menu.xml is missing

I have a relatively new Debian installation -- when it was first installed, it was without a gui, but I ran apt-get install xinit and apt-get install openbox, so when I run startx I get an openbox ...
3
votes
2answers
103 views

What is the usage of pattern before substitute command in sed

There is an example in this link about sed: To delete the first number on all lines that start with a "#" use: sed '/^#/ s/[0-9][0-9]*//' What is the benefit of first pattern(/^#/)? It could be ...
4
votes
1answer
186 views

Identifying kernel modules

How do I get more information about a kernel module, like a long description? For example, I can see kernel modules like lp or hid, but those short codes do not mean anything useful to me.
4
votes
1answer
711 views

Repeat the nth last command in vim

I've noticed vim can be pretty intuitive, but I'm having trouble finding a way to repeat the second-to-last command (or third-to-last, fourth-to-last, etc.). By typing . in normal mode it will repeat ...
1
vote
2answers
199 views

Can't view Chinese chars in evince or xpdf

Instead, I get white squares. I have no idea if they are used, but I installed "xfonts-intl-chinese" (didn't work). I googled this issue, and there was a lot of talk about some bug in poppler. But, ...
7
votes
3answers
14k views

What can I use to monitor and log incoming/outgoing traffic to/from remote hosts?

I run a web server (Debian Squeeze on a VPS), and the graphs provided by the hosting company show consistently that around twice as much traffic is incoming to the server compared to the outgoing ...
1
vote
1answer
405 views

Can't mkdir /root (btrfs)

I performed a standard Debian install using wheezy/testing netinst iso for amd64. After the install completed I booted into a live environment so that I could snapshot the root as a btrfs subvolume ...
4
votes
5answers
9k views

How can I upgrade pip on Ubuntu 10.04?

On Ubuntu 10.04 I've used apt-get install pip to install pip after which I installed django. Then I tried to uninstall django with pip via pip uninstall django which gives me: pip: error: No command ...
2
votes
1answer
423 views

Ctrl-Alt-F1 to F6 work differently for left and right sides of the keyboard

If I want to log in to the traditional text shell, I can only use the right side control and alt keys, the left side ones will do nothing. Once I switch to another shell, I now have to use the left ...
18
votes
4answers
62k views

Why the default eth0 interface is down by default on CentOS?

I am already a little bit familiar with Linux distros like Debian or Ubuntu (yeah, very similar) but I wanted to try Red Hat based - CentOS 6.2 . I have installed it on my Windows 7 host in virtualBox ...
2
votes
1answer
384 views

Have shotwell go through pictures in directory in order?

This has been bothering me for a long time. I have a fairly default installation of Fedora 16 with Gnome 3. I know that since Fedora 15 (don't know about before) I have never been able to view ...
1
vote
0answers
524 views

qemu-kvm savevm very slow

I have up to date gentoo system with kvm images located on 500 gb partition with 200 gb of free space and defragmented, running machine with Windows XP and 2gb ram, I have problem with making snapshot ...
1
vote
1answer
4k views

How can I resolve the “invalid ELF header” warning when trying to SSH and what does it mean?

I'm getting some kind of warning when checking my connection to github. Why is it happening and how can I resolve it? $ ssh -TI ~/.ssh/id_rsa git@github.com dlopen /home/ubuntu/.ssh/id_rsa failed: ...
9
votes
3answers
12k views

Getting the password expire time

Let me preface this with: I do NOT have root access available. I recently got locked out of my account because I did not know the password expiration was getting close, then elapsed. I want to add a ...
1
vote
2answers
1k views

RedHat Linux Space Usage Problem

I recently downloaded something on my Redhat Linux computer, and it told me I was out of space. I checked my disk usage, and it says I've used 100% of my folder, but as you can see I still have almost ...
1
vote
2answers
692 views

dig returns different IP address when dropping the “www.” from domain name

I have performed a dig on my domain name used on my site and I seem to be getting different results when I drop the "www." from the lookup. I am concerned this is causing me issues within my ...
1
vote
1answer
562 views

Why doesn't Ruby's configure script detect my executables and header files?

I'm trying to compile Ruby and really understanding what's going on while doing so. I've used and written Makefiles before, but not autoconf's configure.in files, so maybe the result I'm getting is by ...
1
vote
1answer
126 views

SSH server timing out localhost and reassigning breaks X11 output

I'm running a python script on a remote server via SSH, however at the end I require it to save a graph using pyplot, which requires the X server to be active. As this runs for a long time I have ...
2
votes
1answer
841 views

Printing files as PDF with syntax highlighting via terminal [duplicate]

Possible Duplicate: syntax_highlight <source_file> | lpr I have about 20 Python scripts that I wish to print as PDF. I wish to print them the way GEdit would allow me to, with: ...
7
votes
2answers
3k views

How can you determine which process scheduler is being used? [duplicate]

I.e. is it the O(1) scheduler, the CFS scheduler, or an older one?
2
votes
2answers
344 views

Untar directory from large tarball

How do I untar a directory that I don't know the path to? I only know the directory name. I know how to untar a single file with a wildcard: tar -xf somefile.tar.gz --wildcards --no-anchored ...
2
votes
0answers
253 views

No Video Output with DVI to VGA converter

Here's a weird one... so X definitely grabbed all the EDID info from my second monitor, as nothing seems amiss in any output or log. The system responds correctly to enabling output, i.e. xrandr ...
1
vote
1answer
2k views

exclude commands from user's sudo permissions

Consider the following line in a /etc/sudoers file: username ALL=(ALL) ALL, !/usr/bin/passwd as far as I know, this allows user username to use sudo, unless he not uses /usr/bin/passwd. But ...
1
vote
2answers
94 views

Where are “headers” for other languages kept?

If I were to write a library for a C-incompatible language (like D), where would be the best place to install my "header files" to? usr/include seems like a bad idea, since the FHS says it's for ...
2
votes
0answers
84 views

Envirnment variables for packages built in custom location

Some time ago (month or so) I started to install packages that I build from source in custom location ~/.local so that I can easily distinguish which I build from source, and for other reasons, ...
29
votes
10answers
58k views

Streaming to an Apple TV (3) from Linux

Alright, here is the setup: One apple tv 3 in the living room, connected to the network (wired). One pc running Linux (Arch Linux x64, AMD), containing all music, movies and series (wired). Now I ...
14
votes
2answers
17k views

“mount -t TYPE /” - how to know that what could the “TYPE” be?

OS: ex.: Ubuntu 10.04 - how to know that what does the "mount -t TYPE" knows? I mean is there a command to list the supported filesystem types using with mount?? UPDATE: is the following cmd always ...
3
votes
2answers
6k views

Move huge number of files into date structured directory order

I have about 1 million files in this directory: /home/username/images/ Each of the files are called something like: 012345678910(Place)_0_20120414185957_28841.jpg with the timestamp part of the ...
2
votes
1answer
1k views

file, awk and iconv to automatically adapt tex-file encoding

I have a set of tex-files with mixed encodings, e.g. (subset of output of file -i *.tex) f1.tex: text/plain; charset=utf-8 f2.tex: text/plain; charset=utf-8 f3.tex: text/x-tex; charset=us-ascii ...
9
votes
2answers
22k views

How to telnet via proxy authentication?

I am behind a proxy server in my college. It uses a simple username and password authentication. And i connect to the proxy server to port 3128. now i want to telnet simply to say any website on the ...
3
votes
3answers
3k views

How to reorder a large number of columns?

I'm looking for a pipeable one-liner to reorder a large number of columns (where manually entering the column numbers in e.g. an awk command such as awk '{print $3,$2,$1}' is not feasible). The order ...
1
vote
1answer
866 views

Is it possible to redirect X of an ssh session to the display of a connected vncviewer

I have a setup of three machines. Machine A runs a vncserver and an ssh server, Machine B runs a vncviewer, Machine C runs an ssh client. The vncviewer on B connects to the vnc server on A. The ...
0
votes
2answers
10k views

Shell script how to read input from a file [closed]

I need to read input from a file given in following format. $ ./process_data.sh arg1 < input_data.txt How do I read input_data in my shell script process_data.sh?
2
votes
2answers
3k views

command OR script to detect vpn connection status

I'm using Ubuntu Network Manager VPN client to connect to a PPTP vpn server. I have an application that get some data from internet and must be runned from behind the VPN. I need to suspend ...
1
vote
1answer
412 views

Unable to kill sar process

I have a shell script to run JMeter test. Script generates the Jmeter log out put and creates sar (suppose to create sar file though it does not). Shell script is - runtest() { export ...

15 30 50 per page