1
vote
2answers
909 views

Setting up Apache 2 Local Development Environment & Permissions

I frequently find myself encountering problems (usually permissions) when trying to setup a local development server. Or creating a new site (alias). Very common problem is I need to allow www-data ...
7
votes
6answers
8k views

What's the best way to count the number of files in a directory? [duplicate]

If parsing the output of ls is dangerous because it can break on some funky characters (spaces, \n, ... ), what's the best way to know the number of files in a directory? I usualy rely on find to ...
0
votes
1answer
271 views

Setting system/hardware clock under Debian

I have installed a system with a London timezone, instead of using Central European Time. The problem is, that hwclock says the time is 11:00, date says the time is 11:00. I have changed the timezone ...
4
votes
1answer
1k views

Running xen inside VirtualBox , possible?

Can i run a Linux system inside VirtualBox or VMware , with xen kernel ? It's not intended for a real server or production workplace , just to learn the configuration of XEN. BTW: target computer ...
2
votes
4answers
4k views

Set Default/Global Gnome Preferences (Gnome 3)

I have recently switched to Gnome 3 from Gnome 2 (and switched to Linux recently before that), and Gnome 3 doesn't give me as many options to change settings via the GUI, and especially not to change ...
1
vote
0answers
419 views

How is the Linux kernel stack organised for ARM architecture?

Can any one explain how exactly linux kernel stack organisation is handled? When a child process is created using the fork() system call, how is the kernel stack space initialized?
1
vote
1answer
222 views

Tab and complete

Is the key binding for tab to complete in the readline settings set implicitly. Because when I outputted bind -q complete I got this in return complete can be invoked via "\C-i", "\e\e". ...
2
votes
0answers
317 views

What happens when you background a function which calls another function?

Question says it all on the tin. Can someone explain to me what goes on here ? I'm trying to find out how to background a process in a script that calls another function and reliably terminate it when ...
1
vote
1answer
446 views

How to demux audio and know what type it is?

How to demuxed audio and know what type it is? When muxing an audio into a video, ffmpeg, mencoder, etc require to know what the audio's encoding is. The encoder typically uses the file name's ...
5
votes
2answers
727 views

Setting readline variables in the shell

I read in the man page, that you set readline parameters on an off or to a value by using set var value Is this the same as the set builtin, and how do you set the variables once inputrc has already ...
2
votes
1answer
249 views

Is it possible to control window management in Gnome Shell using D-Bus?

I would like to programmatically be able to communicate with the Window Manager in Gnome 3, using D-Bus. The tasks I would like to accomplish are: listening for new windows get window flags (e.g. ...
2
votes
2answers
726 views

Default settings for VirtualBox machines?

How can I change the default settings of virtual machines that are created by VirtualBox? I don't need any floppy devices or sound enabled by default.
4
votes
2answers
4k views

How can I know when a cron job was killed or it crashed?

Usually when a cron job crash, it will leave some error messages in the log. We run shell script and some java program with cron job. Recently we found some weird thing out from the log. Obviously ...
2
votes
2answers
7k views

How to send the email which is sleeping in my queue list?

When i send email it sleep in my queue list. How can i send them out? (Fedora 15 distro). # mailq /var/spool/mqueue (2 requests) -----Q-ID----- --Size-- -----Q-Time----- ...
1
vote
2answers
874 views

Which Linux distributions have good screen magnifier software, either freely available, or preinstalled?

Which linux distributions have good screen magnifier software, either freely available, or preinstalled with the OS? Being a visually impaired nerd, I'd like to gain experience on as many platforms ...
4
votes
2answers
4k views

Middle click with two-finger tap on touchpad

In Linux Mint the default action when tapping the touchpad with two fingers is a right click. How can I change this to middle click?
10
votes
3answers
8k views

Mount a filesystem read-only, and redirect writes to RAM?

Is it possible to mount a loopback file as read-only, and redirect all writes to RAM?
3
votes
1answer
302 views

How to use SCSUDO to run scripts with positional parameters?

I am trying to use scsudo to run a number of defined commands to stop and start processes on a UNIX host. The issue I am experiencing is that scsudo does not seem to like the use of positional ...
4
votes
6answers
1k views

How to align a column in a text file

Using bash on Linux, how can I process a text file such that space is inserted before a certain column so that column is aligned in the output? For example: Input 1653455 ASDFASDF22 bla bla bla asd ...
4
votes
1answer
227 views

History of apropos command

I am writing a paper on my project, the goal of which is to write a new implementation of the apropos(1) command. While I realize that apropos was written in the early days of Unix when computing ...
24
votes
4answers
34k views

What does ` (backquote/backtick) mean in bash?

I came across the following command sudo chown `id -u` /somedir And I wonder what is the meaning of the ` symbol. I noticed for instance that while the command above works well the one below does ...
4
votes
4answers
515 views

How can I access a remote Linux VM behind a firewall?

One of my customers runs a Linux VM on his PC and I need to access it remotely. This is a PC computer, not a server, so it is connected to the internet most of the time. It has a firewall too. I need ...
8
votes
3answers
12k views

Bash - test for newline?

In various places around the web I've found: \015 \012 \x0a - hex \n \r all as synonyms for various newlines / carriage returns... But in this small script I cannot recognise when I come across a ...
36
votes
2answers
26k views

How to use wildcards (*) when copying with scp?

Why can't I copy with scp when I'm using * characters in the path? scp SERVERNAME:/DIR/* . What configs do SCP need to allow * in the path? UPDATE: the problem is not on server side, pscp is ...
2
votes
1answer
174 views

ide and pci bus commands

Is the ide interface also a bus? Is there a command like lspci or lsusb, to find out what devices are on the ide bus? Sources seem to contradict eachother. I'm asking this question here because of the ...
2
votes
3answers
1k views

Vim shortcuts in insert mode

When I'm entering some text in vim, sometimes I need to jump to some other place and enter more text. I know there are some shortcuts with ctrl key to simplify the movement. What are the most useful ...
3
votes
1answer
1k views

How to make SSH tunnel as daemon?

Actually, I need a secured VPN, but configuring it was too hard for me. So I decided to use SSH tunnel. The tunnel could be established when I logged in. :( (1) How can I make a SSH tunnel without ...
2
votes
4answers
1k views

Bash options and interactive shells

The -s option to bash doesn't seem to really do anything When I execute commands with or without it nothing changes. What really confuses me is when I execute a shell script I always seem to be ...
1
vote
1answer
612 views

config fstab file for a diefferent partition root directories

I have copied my /var /opt /usr directories to a newpartititon and now I need to configure the fstab file. That is the new partition content: drwxr-xr-x 6 root root 4096 Dec 20 12:16 opt ...
1
vote
3answers
567 views

Script to count files matching a pattern in subdirectories

I wrote the following script for finding the number of pdf and tex files from the current directory, including the subdirectories and hidden files. The following code is able to find the number of pdf ...
1
vote
2answers
212 views

conditional expression and expansion

I don't seem to understand how to "test" the conditional operators [[ and [. I tried using various form such as echo [[a=a]] [[a=a]] echo $? and some other things I want to see what they ...
1
vote
1answer
325 views

my linux can't see atrix 4g's second sd card device

My device is a Motorola Atrix 4G (ME860). It has an 11G internal SD card, and I inserted a new 16G SD card into the SD Card slot. When I connect the phone to my computer with a USB cable, it shows ...
1
vote
4answers
801 views

grep seems to ignore --include

man grep says grep [OPTIONS] PATTERN [FILE...] . . . --include=GLOB Search only files whose base name matches GLOB (using wildcard matching as described under --exclude). ...
10
votes
4answers
10k views

How do I reverse a for loop?

How do I properly do a for loop in reverse order? for f in /var/logs/foo*.log; do bar "$f" done I need a solution that doesn't break for funky characters in the file names.
1
vote
2answers
195 views

is setting a 0 permission on a directory an effective way to protect its contents?

Let's say that permissions for user and group are set up correctly on a directory. Would a 0 permission for other on that directory provide effective access control for the directory's files and ...
2
votes
0answers
86 views

Can sources.list only be updated by hand?

I'm currently running Linux Mint. I remember that under Ubuntu, whenever a new release comes out, it prompts you with a choice of whether to upgrade or not. It seems like this is not happening in ...
2
votes
2answers
3k views

ldconfig issue with non-standard lib directory in CentOS

I am working with a virtual machine (CentOS 5.3) that has very little storage space on the main drive (which includes /usr, /usr/local, etc). Most of the storage space is available on a separate drive ...
1
vote
1answer
935 views

gnome 3 system sounds not working

On my System (Debian Wheezy x64, Gnome 3) I don't have any system sounds. Other audio is working well. When I go to settings > Audio > Sounds (hope it is called like this in english) as normal user, ...
1
vote
1answer
1k views

System menu and desktop right click dont appear in Gnome3

I run Arch Linux with Gnome3. I need to escape from the "routine" and change to Gnome for some weeks or even months. When I open it I can't see the system menu (which is supposed to be right of ...
2
votes
2answers
693 views

Can I share a folder inside my home directory with another user?

Can I share a folder inside my home directory with another user? I have two users on a system, agent and daemon. An external server connects as agent and rsyncs files to ~agent/incoming I want ...
11
votes
1answer
13k views

Zip everything in current directory

I'd like to compress and package everything, including files and folders in current directory, into a single ZIP file on Ubuntu. What would be the most convenient command for this (and name of the ...
4
votes
1answer
679 views

Resize a very tiny xcf image without blurring or dithering it

I have some drawings I made with an Intuos tablet. All of these drawings are 25x35 or so. The color of each pixel was very carefully selected. They're kind of like 'miniatures.' I need to resize ...
3
votes
2answers
796 views

Convert a typescript file to a list of commands (history)

I wanted to record a linux session so I could use it as documentation for a "how to install" guide. I found something on the internet that suggested that the script command would be good for this, and ...
27
votes
3answers
19k views

Why can't a normal user `chown` a file?

Why is the chown command root-only? Why can't non-root users use chown to give away files they own?
3
votes
2answers
502 views

Choosing a device name under /dev from the kernel command line

I am booting CentOS via a USB install. The boot method is simply booting the ISO from GRUB2 installed on the USB Key. The USB key always gets the "name" /dev/sda. Can I change that name from the ...
4
votes
2answers
213 views

Why were tables built into ipchains?

Why are tables built into ipchains? What was the benefit of adding tables to ipchains? Is there a simple scenario that would illustrate how tables are used to increase performance or offer some other ...
2
votes
2answers
218 views

What don't I need to backup?

I'm trying to do a simple system backup (with cpio or tar), and I was looking for what I need to back up and found this question. The answer was basically, "it depends on what you're running on your ...
2
votes
4answers
733 views

Update Linux Path permanently [duplicate]

Possible Duplicate: How do I set a user environment variable? (permanently, not session) How can I permanently modify the PATH variable in Ubuntu? Is it possible to do it without modifying ...
1
vote
1answer
574 views

How can I move firewall settings from one Debian Squeeze web server to another?

I configured a Debian Squeeze virtual machine in VMWare on my laptop. I configured it with a very restrictive set of firewall rules using Firestarter. I then uploaded a copy of its disk image to use ...
2
votes
2answers
313 views

Why does “$i | sed” not work?

I have this code: if [ $i | sed -e "s/^.*\(.\)$/\1/" = "/" ] then echo "folder" else echo "file" fi where $i is something like this app4/ The code above should get the last char of the ...

15 30 50 per page