2
votes
4answers
3k views

Increment number in bash variable string

VERSION="4.0beta12" NEXT_VERSION=????? Writing an automatic release script, I have the current version in a variable $VERSION, and I would like to calculate the next version as $NEXT_VERSION. Rule: ...
1
vote
2answers
152 views

How to change the interpret of a variable in `zsh`?

I set a variable TEMPP='-I ../dir1 -I ../dir2' then I run gcc -M $TEMPP somefile.c It seems not to include ../dir1 and ../dir2 in the search list of the include file, and if there is a space at the ...
2
votes
5answers
4k views

Why does the column command not align columns properly?

In another question I asked on how to hide all .pyc files when using ls, Ignacio suggested the following: This, as I mentioned above, doesn't work precisely, since the output is occasionally ...
2
votes
2answers
1k views

How do I show all files in a directory except those that have a certain extension AND display them in multiple columns?

Since I write in Python a lot it's kind of annoying to see .pyc files all the time and I would like to just hide them at this point. I tried the following, but I can't seem to figure out how to get it ...
12
votes
2answers
925 views

Manipulating X key and pointer grabs on the command line

What command line tools exist to list and manage X server grabs? (That's grab as in key and pointer grabs, i.e. restricting the use of a particular key or mouse button to a particular application, or ...
15
votes
3answers
1k views

Newlines in filenames

I understand and accept the premise that defensive1 shell scripting is both prudent and, in the longer term, more sustainable. Many of the answers to text processing questions here follow this ...
4
votes
1answer
492 views

How to run gVim in a single instance

I want it in such a way that on double clicking an already opened file, or a new file, gVim uses the same window. From this question asked previously on Stackoverflow I figured out how to do this by ...
1
vote
1answer
553 views

How does one enable different backgrounds for each viewport screen in linux?

I was wondering if it was possible to enable different desktop backgrounds in the four different gnome viewport screens using linux mint?
24
votes
4answers
28k views

Can I safely remove /var/cache?

I am running out of disk space and noted that I have a large /var/cache directory. Can I safely remove this? (using Arch Linux, BTW).
19
votes
1answer
3k views

Run a command for a specified time and then abort if time exceeds

I want know how I can run a command for a specified time say, one minute and if it doesn't complete execution then I should be able to stop it.
2
votes
3answers
1k views

How can I find all ascii files under one directory that have the word shirt in them? Starting from root

What command would I use to find all of the files under the girl directory that have the ascii text “shirt” inside the files, starting from the root directory?
3
votes
1answer
706 views

Copy just permissions and ownership from one tar file to another

I have two tar files which are basically backups of my /data folder on android. The problem is the permissions and ownership of the files inside latest back-up is messed up. However the permissions in ...
17
votes
3answers
4k views

ESC key causes a small delay in terminal due to its Alt+ behavior

My terminal setup is gnome-terminal + tmux + zsh with vi bindings. In applications like vim or even in the zsh's command line vi editing mode, I need to frequently hit the ESC key but there is a ...
2
votes
3answers
4k views

Cannot adjust brightness via Fn key

I just set up a new Arch with Gnome 3.2. Until now, everything seems to work fine, except for the brightness adjustment. When I try to adjust the brightness from within the Gnome settings or with ...
10
votes
4answers
1k views

How can I reliably “hold” a package in Debian?

I have a package in Debian that has been manually patched (not ideal, I know) that I must hold at its current version so upgrades don't overwrite the patched changes (I will manually inspect and apply ...
10
votes
6answers
12k views

How to report number of files in all subdirectories?

I need to inspect all sub-directories and report how many files (without further recursion) they contain: directoryName1 numberOfFiles directoryName2 numberOfFiles
1
vote
0answers
205 views

Broken link/launch behaviour on Kubuntu 11.10 desktop after rekonq uninstalled

Since I removed rekonq from my system, numerous apps which launch links, e.g. Stackapplet and Thunderbird are not correctly launching links with Firefox, which I am using now as my primary browser. I ...
1
vote
1answer
1k views

How to re-enable hibernate in Kubuntu 11.10?

After making some changes to my swap space, namely deleting and recreating swap space, my Kubuntu 11.10 has lost hibernate functionality. Although the button has returned, hibernating only appears to ...
4
votes
4answers
4k views

How to convert hex chars to normal chars?

I tried, but I'm stuck at "escaping" the "sed's": sed -i 's/\\x0/NUL/g' $1 sed -i 's/\\x1/SOH/g' $1 sed -i 's/\\x2/STX/g' $1 sed -i 's/\\x3/ETX/g' $1 sed -i 's/\\x4/EOT/g' $1 sed -i 's/\\x5/ENQ/g' ...
32
votes
4answers
81k views

What is the “eval” command in bash?

What can a man do with the "eval" command, why is it usefull? It's some kind of built-in function in bash? There is no "man" page for it..
7
votes
2answers
8k views

How to install packages to a custom location in centos6

I have a shared location, let me call it /tp I want to install all my libraries and packages in this location just like the default install. Reason to do this is: I want all the users in the network ...
22
votes
2answers
23k views

Limit process to one cpu core

How to limit process to one cpu core ? Something similar to ulimit or cpulimit would be nice. (Just to ensure: I do NOT want to limit percentage usage or time of execution. I want to force app (with ...
3
votes
1answer
279 views

Can't run certain fullscreen applications

I have a dual screen setup which I've configured by running this command at startup: xrandr --output VGA-0 --auto --right-of DVI-0 I'm running OpenSuse 11.4 with dwm as my window manager. I can ...
0
votes
3answers
339 views

Fedora, CentOS, Ubuntu Linux all are open source linux, but what about when i want to make my own brand from that?

I have used Fedora/Ubuntu/CentOS all of them, and they are open source linux, free to all users and free to do almost anything. But i do not get this correctly yet. They are open source, and they ...
1
vote
1answer
59 views

Reading the man pages in my system with hyperlinks on a browser [duplicate]

Possible Duplicate: How to follow links in linux man pages? I can read man pages online, but they are not necessarily the same that I have installed on my system (i.e. for the same ...
1
vote
2answers
181 views

Differences between man pages

I often find myself reading man pages online instead of from the command line on my system. Part of the reason is because I find it easier to browse this information on a browser on the Internet than ...
2
votes
1answer
4k views

Changing my default primary GID for every login session

I read the following about newgrp: The newgrp command is used to change the current group ID during a login session. This made me think, how can I change my default's primary group ...
2
votes
1answer
675 views

How to read a hexdump byte by byte in bash or awk?

This is the hexadecimal output of an IPv6 TCP packet captured with tcpdump: 6000 0000 0018 0620 0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0000 0000 0000 0000 0002 *0026 0026 0000 ...
1
vote
1answer
195 views

Install r5u87x on FreeBSD

I need to install Ricoh r5u87x webcam loader on FreeBSD, because it solve not suspending in unix/linux boxes on my vaio laptop as I try it in UBUNTU, but the loader is simply for Linux, I think. Is ...
0
votes
1answer
5k views

yum groupinstall “Development Libraries”

I am new to linux. I am looking at some configuration notes for a CentOS, but I am configuring a Redhat machine. I am not clear: What the below commands install? Why one might install these? ...
0
votes
0answers
757 views

How to install VGA2USB in ArchLinux?

How do I install VGA2USB in Arch Linux? I downloaded the driver vga2usb-3.26.0.27-ubuntu-3.0.0-12-server_X86_64.tbz I tried with latest kernel did not worked failed with same issue, now showing with ...
8
votes
4answers
2k views

Suspend/resume single process to/from disk

On occasion, we would like to suspend memory-intensive processes on our Ubuntu and OS X servers to temporarily free up some RAM for other jobs. If all we were worried about was CPU usage, a simple ...
2
votes
2answers
5k views

How to exclude a list of full directory paths in find command on Solaris

(Duplicated from Stack Overflow: http://stackoverflow.com/questions/7854975/how-to-exclude-a-list-of-full-directory-paths-in-find-command-on-solaris) I have a very specific need to find unowned files ...
1
vote
1answer
172 views

HPLIP spitting out raw data when I attempt to print

We got a new printer (HP m1212nf) as it was stated on the hplip site to be supported. Printer has been tested in windows so we know it works as well as it's network setup. Current system I am ...
27
votes
2answers
19k views

How can I check if swap is active from the command line?

How can I check if swap is active, and which swap devices are set up, on the command line?
1
vote
1answer
572 views

Sticky bit vs setgid for facilitating shared write access

Say two people with different primary unix GIDs share and need to frequently edit the same file. The users are not members of each others' primary unix GIDs, but they are both members of a common ...
3
votes
6answers
4k views

How can I check what version of the VI editor I have?

How can I check what version of the vi editor I have? What's the best way to upgrade it or install vim on Solaris?
1
vote
2answers
1k views

Process list: /bin/sh -e /proc/self/fd/11

I got this: PID TTY STAT TIME COMMAND 2 ? S 0:00 [kthreadd] 3 ? S 0:00 \_ [migration/0] : 844 ? S 0:00 \_ [vmmemctl] 1 ? ...
10
votes
1answer
2k views

what level of the network stack does tcpdump get its info from?

As I was trying in vain to fix a faulty ethernet controller here, one thing I tried was running tcpdump on the machine. I found it interesting that tcpdump was able to detect that some of the ICMP ...
3
votes
3answers
738 views

Do I need a desktop to run a GUI?

I am setting up a lightweight VM, following the guide in the Ubuntu Documentation What I want to be able to do is ssh into the VM and then launch a GUI application. I don't need / want a desktop. ...
0
votes
2answers
969 views

Combination of ls, xargs and zcat leads to duplicate file name suffixes?

Disclaimer: Yes, finding files in a script with ls is bad, but find can't sort by modification date. Using ls and xargs with echo everything is fine: $ ls -t1 ssl-access*.gz | xargs -n 1 echo ...
1
vote
4answers
945 views

How long will Debian be supporting Gnome 2?

I'm choosing a new distro, and I'm trying to avoid Gnome 3 (and Unity). Debian is using Gnome 2.3, but I'm not sure for how long -- I don't want to install it and be forced to update to Gnome 3 in a ...
11
votes
4answers
619 views

How to write a script that effectively determines distro name?

I saw this post on all the different ways to find out what distro is installed, so I'm trying to write a script that tries them all. The possible commands include: $ cat /etc/lsb-release $ cat ...
2
votes
1answer
138 views

Start and stop multiple executable for easy debugging

I'm debugging a networking project, which involves interacting of 3 programs, ie a server, two different clients. However I find it difficult to start and stop them for debugging. Some methods I have ...
1
vote
1answer
514 views

How do I set Keyboard and profile preferences when connecting to Solaris via SSH?

I'm connecting to a Solaris box from Mac OS X. Whenever I have connected to linux boxes in the past it has been much easier to navigate around. How do I fix these configuration issues on Solaris? ...
3
votes
1answer
650 views

grep and brackets in text

I store downloaded files in a log like this: [source] filename To avoid downloading a file more than once I grep for [source] filename before: if ! grep "$signature" downloaded.log > ...
1
vote
3answers
1k views

Why must swap partition be nested when created as an extended partition?

I did not want to use up my last primary partition so I created my new swap partition as an extended partition. However, somewhat redundantly, it is created under sda4. This makes little sense as ...
1
vote
1answer
8k views

Mount a Windows network drive

I want to mount a netword drive on the server (SBS2008). I have two options: Either using a fedora which already mounts on a CentOS server or directly on the CentOS server. Here is the command I tried ...
15
votes
5answers
6k views

How can I get bash to exit on backtick failure in a similar way to pipefail?

So I like to harden my bash scripts wherever I can (and when not able to delegate to a language like Python/Ruby) to ensure errors do not go uncaught. In that vein I have a strict.sh, which contains ...
2
votes
1answer
2k views

Starting syslog-ng

I've recently installed syslog-ng but am confused about how to start it (on Fedora). I do: /etc/init.d/syslog-ng start which reports that it's started ok. However, it doesn't actually do anything ...

15 30 50 per page