Convert a folder of images into a multi-page pdf file usind command line tools?

I have a folder with 100 jpg images. I want to convert these images into a multi-page pdf file, with all the images (cropped to A4 size). They are already in the correct rotation. Which tools should I use?


How to clear environment variables in launchd?

Currently, I have this bash script:               #!/bin/bash     function clear_secrets {       export bob=""       export john=""     }     clear_secrets      And I want this bash script to run every 1 minute through launchd. However, when I set those environment variables in a bash session, they are not being cleared out after a minute. I'm assuming it's because launchd runs the script in a different session. Is there a way to have launchd affect all bash sessions? To clarify, I want to clear some environment variables every minute in all current bash sessions. I tried this using a bash script and having launchd sourcing that bash script every minute. What can I do to achieve this?


For loop for renaming files with prompt for each filename

I have to convert multiple video files in a folder. I have to rename each one of them but I need the script to prompt me to write a custom name for each filename. Here is what I've got so far:   1. First I need to remove the filename spaces which my script does with that command:              for f in *' '*; do mv "$f" "`echo $f | sed -e 's/ /_/g'`"; done        2. I remove the extension of the files because I don't need it for the conversion. I use this command:              for x in *; do mv $x $(echo ${x%*.*}); done      After that I need a for loop to rename each file in the pattern:               for i in * ; do mv $i $customname; done      The problem is that I need in that phase the script to prompt me what name to add in the variable `$customname` for each file. Something like this:               Rename file1 to:     .......          Rename file2 to:     .......


hiding a php file/folder with php file from ftp user

Is it possible to hide the php files or hide a folder with php files from FTP user accessing? But the files can be executed on a webserver?


Setting LS_COLORS and in a GNU Screen

Is there a way to set a GNU Screen LS_COLORS to that of the default non-screen terminal window? Is there `.screenrc` or `.screen_profile`, I don't understand what happens when a GNU Screen is initialized?


Can I use pxelinux to boot from an ISOs over the network?

I have a server which hosts mirrors for FreeBSD, CentOS and Scientific Linux. It includes .iso files. Is it possible to use pxelinux to boot this ISO over the network? Must I use gPXE or iPXE instead? I have seen some indication that this is possible, but I'm not sure that I trust that forum post, as I have not gotten this to work. I have the following configuration:               LABEL freebsd-install-net       MENU LABEL Netboot FreeBSD-8.2-RELEASE-amd64-disc1.iso       KERNEL memdisk       APPEND iso raw initrd=http://192.168.1.100/freebsd82-disc1.iso      But pxelinux tells me the following:               Loading memdisk....     Could not find ramdisk image: http://192.168.1.100/freebsd82-disc1.iso


Make sure X server isn't already running?

Suddenly out of the blue I was able to start the X server but with many warnings on CentOS and then I tried to make sure it was shut down by going into /usr/bin and `gdm stop` but there is an error log which states:               [2148293.861] _XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed     [2148293.861] _XSERVTransMakeAllCOTSServerListeners: server already running     [2148293.861]     Fatal server error:     [2148293.862] Cannot establish any listening sockets - Make sure an X server isn't already running     [2148293.862] (EE)     Please consult the CentOS support              at http://wiki.centos.org/Documentation      for help.     [2148293.862] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.     [2148293.862] (EE)     [2148293.862] Server terminated with error (1). Closing log file.      With `gdm stop` I get:               ** (gdm-binary:25390): WARNING **: Couldn't connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or director


tmux on startup and ssh-agent forwarding issue

I've added the following lines (taken from here) to my .bashrc to automatically start a tmux session on login:               if [ "$PS1" != "" -a "${STARTED_TMUX:-x}" = x -a "${SSH_TTY:-x}" != x ]     then             STARTED_TMUX=1; export STARTED_TMUX             sleep 1             ( (tmux has-session -t remote && tmux attach-session -t remote) || (tmux new-session -s remote) ) && exit 0             echo "tmux failed to start"     fi      However, this seems to breaks ssh agent forwarding on subsequent logins. Is there a way around this?


how to clean free row/column spaces after the row of your data

I have a problem in cleaning my file where there are unnecessary free spaces below my last data row. This is created when I am copying and pasting my data from excel to text. I want my text file to fit my data only. This will reduce the computational time when I am running my model. I just came to know the size of my file is big due to the unwanted free space below my last data row. I want you help me how clean up the unwanted rows.


Is there anything in unix crontab to determine this should be executed in PST/CST standard time?

There is this thing in QuartzScheduler where we can say execute this in CST/BST/ or whatever timezone. This is also good when you want to execute some jobs in certain timezones and certain jobs in some other timezones. Is there something like that in crontab where we can specify the timezone, because I have been seeing people going crazy numerous times when there is a timezone change and they have to go through the list of jobs in crontab where they have to change timings. `I am looking for something where we can execute certain jobs in certain timezones and certain other jobs in some other timezones.`


Create new linux account as a user without root access

Is it possible to create a non-root Linux user account without being logged in as a root user and without using `sudo`?


Protect application files in from access by the same user

I want to know if it's possible for an application to create files accessible only from the application itself. Problem is that I don't have root access. For example, if I run the application as UserA I want to ensure that any other application run by UserA cannot access the files.


Terminal won't go back to prompt after launching app

I'm running elementary OS Luna (based on Ubuntu 12.04) on which I've installed `Okular` as I consider it to be the best PDF reader even if it's meant primarily for KDE. The issue is this, I need to use the terminal to tell `Okular` to open a file and then I want it to go back to the prompt. I've tried the standard:               okular file.pdf &      but it doesn't work. The terminal is only released after I close `Okular` and as I understand it, the `&` command should do that automatically. What am I doing wrong? * * * **Add** This is what I get in the terminal after issuing the above command:               okular(13592)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     okular(13592)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     okular(13592)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     okular(13592)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     okular(13592)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     This backend is only for XRandR 1.1, your version is:  1 . 3


Can it harm if I shutdown without closing applications?

Can it hurt if I shut down my machine without closing all programs? I normally close all of them by hand, but have heard from others that this is really not necessary anymore (i.e. Linux will take care of proper closing of programs before shutting down the computer). I normally run applications like Thunderbird, VIM (with no unsaved files opened), and browser windows when I shut down my pc. And I would make sure not to be writing anything to USB when shutting down. Running Arch Linux and shutting down using ConsoleKit.


How do you make DISPLAY variable undefined?

I am using Ubuntu, but I think this applies to all Linux. What's the command to set DISPLAY to be undefined in the shell?


Preventing access to TTY when X is killed

Assume I start an X server manually from a virtual console `/dev/tty1` with `xinit` or `startx`, with the line `id:3:initdefault:` set in `/etc/inittab`. The X server gets run and put on another virtual console, normally being `/dev/tty7`. After some time I decide to lock the screen with `xscreensaver --lock` and leave my computer. To unlock the screen one would have to know my user's password. If someone now decides to kill the running X server, he or she would be returned to the shell running at `/dev/tty1` and pretty much have access to my computer. Typically, the X server can be killed with `Ctrl+Alt+Backspace` or switching to the initial console and `SIGTERM` the running process with `^C`. This is trivial to do - which means there must be trivial ways to prevent it from happening. I'm using `vlock` to lock my virtual console `/dev/tty1` to prevent this:               $ xinit && vlock || vlock      When the X server now returns, gracefully `&&` or not `||`, the console will be locked. This may not be the optimal solution. I've read this thread and this wiki article, explaining different solutions. What other methods are there to prevent this kind of access to virtual consoles from X sessions? Is the above method safe enough? How do you prevent this on your system? I'm not going to use a display manager.


Prevent specific USB device from automounting

I have a SD card which is always inserted in my SD-card slot. However, I do not often use it (but do not want to take it out). Currently, it's being auto- mounted every time I start my computer. I feel this might over time wear out the SD card unnecessarily. So my question is: how to prevent this particular SD card from being mounted automatically? Whenever I need it, I'll mount it manually. I've found this article: http://www.tuxradar.com/answers/706 Which explains exactly what to do using HAL, but given that HAL is deprecated I'm looking for a way of doing this using udev. Using Arch Linux.


How do I proceed further when my reports of a improper functioning of a gnome component has not met with answers on the respective mailing list

I am unable to connect to internet using my modem. I followed instructions to seek help at http://live.gnome.org/NetworkManager/Debugging and posted on http://mail.gnome.org/archives/networkmanager-list/2011-October/msg00194.html. There was an initial response from the mailing list, but now its silent. What should I do in this situation? Do I go ahead and just file a bug at bugzilla.gnome.org? Though I am competent enough to help somebody fixing bugs by providing required more information, I am not competent enough to try and help fixing the bug myself.


Cron allowed special character "L" for "Last day of the month" on Debian

I'd like to know if `L` is one of the allowed special characters on Debian's cron implementation? I'm trying to set up a cron to run on the last day of every month. From the cron entry on wikipedia: > 'L' stands for "last". When used in the day-of-week field, it allows you to > specify constructs such as "the last Friday" ("5L") of a given month. In the > day-of-month field, it specifies the last day of the month. > > Note: L is a non-standard character and exists only in some cron > implementations (Quartz java scheduler) If not, how would you go about setting a cron to run on the last day of every month? Would you recommend 3 different entries like this solution on stackoverflow?


how to select part of the row and pasting to form other file?

I want you help me how to organize my data by cutting in the following way. I have the input data as below. **input.file:**               1   2   1   0.6007  0.1 0.3 0.2 0.7 0.7 0   2   0.3073  0.1 0.1 0.2 0.4 0.7 0.5     2   2   1   0.4022  0.1 0.3 0.2 0.7 0.7 0   2   0.5085  0.1 0.1 0.2 0.4 0.7 0.5     3   2   1   0.0029  0.1 0.3 0.2 0.7 0.7 0   2   0.9078  0.1 0.1 0.2 0.4 0.7 0.5     4   2   1   0.0692  0.1 0.3 0.2 0.7 0.7 0   2   0.8805  0.1 0.1 0.2 0.4 0.7 0.5      My desired output file would look like this: **out.file:**               1   2                                            0.6007  1   0.1 0.3 0.2 0.7 0.7 0             0.3073  2   0.1 0.1 0.2 0.4 0.7 0.5     2   2                                            0.4022  1   0.1 0.3 0.2 0.7 0.7 0             0.5085  2   0.1 0.1 0.2 0.4 0.7 0.5     3   2                                            0.0029  1   0.1 0.3 0.2 0.7 0.7 0             0.9078  2   0.1 0.1 0.2 0.4 0.7 0.5     4   2                                            0.0692  1   0.1 0.3 0.2 0.7 0.7 0             0.8805  2   0.1 0.1 0.2 0.4 0.7 0.5


Boot my kernel in a Virtual Machine?

I'm learning now how to compile and boot linux kernels. Is there a way to boot kernels in a virtual machine, rather than messing my system? I use VMWare Workstation on Windows 8. Can I use that to boot my linux kernel?


How do you use minicom with stdin and stdout?

I need to communicate with Python over a USB to RS-232 converter, to a device. The application `minicom` connects seamlessly, so if I could run that in non- interactive mode, everything would would be great. Reading the documentation there are some interesting options, but I'm not fully understanding any one of them:                -t   Terminal type. With this flag, you can override the environment            TERM variable.            -S   script.   Run  the named script at startup.      How do I pipe data between my application and `minicom`? Should I use something else?


Some keys keep getting randomnly ignored when typing on my laptop keyboard

Currently, I have Arch Linux 64-bit installed on the Razer Blade Pro laptop. The only problem I have is that some keystrokes get randomly ignored when typing at normal-fast speed (above 5 keys/sec becomes a problem). This does not occur when typing slow, and never occurs in windows. Is this a problem with the hid-usb controller and Razer laptop antighosting keyboard? We tried solving the problem by following some directions from a forum which mentioned recompiling the kernel with a modified "drivers/hid/usbhid/hid- core.c" file, hardcoding "interval = 1; at line 1134". But we did not reach a solution. My internal devices are:               [cristobal@orion ~]$ lsusb -vv -d 1532:          Bus 001 Device 003: ID 1532:0116 Razer USA, Ltd      Couldn't open device, some information will be missing     Device Descriptor:            bLength                18       bDescriptorType         1       bcdUSB               2.00       bDeviceClass            0 (Defined at Interface level)       bDeviceSubClass         0        bDeviceProtocol         0        bMaxPacketSize0        64       idVendor           0x1532 Razer USA, Ltd       idProduct          0x0116        bcdDevice            1.00       iManufacturer           1        iProduct                2        iSerial                 0        bNumConfigurations      1       Configuration Descriptor:         bLength                 9         bDescriptorType         2         wTotalLength          123         bNumInterfaces          4         bConfigurationValue     1         iConfiguration          0          bmAttributes         0xa0           (Bus Powered)           Remote Wakeup         MaxPower              500mA         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        0           bAlternateSetting       0           bNumEndpoints           1           bInterfaceClass         3 Human Interface Device           bInterfaceSubClass      1 Boot Interface Subclass           bInterfaceProtocol      2 Mouse           iInterface              0              HID Device Descriptor:               bLength                 9               bDescriptorType        33               bcdHID               1.11               bCountryCode            0 Not supported               bNumDescriptors         1               bDescriptorType        34 Report               wDescriptorLength      75              Report Descriptors:                 ** UNAVAILABLE **           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x81  EP 1 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0008  1x 8 bytes             bInterval               8         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        0           bAlternateSetting       1           bNumEndpoints           1           bInterfaceClass         0 (Defined at Interface level)           bInterfaceSubClass      0            bInterfaceProtocol      0            iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x81  EP 1 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0040  1x 64 bytes             bInterval               8         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        1           bAlternateSetting       0           bNumEndpoints           1           bInterfaceClass         3 Human Interface Device           bInterfaceSubClass      0 No Subclass           bInterfaceProtocol      1 Keyboard           iInterface              0              HID Device Descriptor:               bLength                 9               bDescriptorType        33               bcdHID               1.11               bCountryCode            0 Not supported               bNumDescriptors         1               bDescriptorType        34 Report               wDescriptorLength     159              Report Descriptors:                 ** UNAVAILABLE **           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x82  EP 2 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0010  1x 16 bytes             bInterval               8         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        2           bAlternateSetting       0           bNumEndpoints           1           bInterfaceClass         3 Human Interface Device           bInterfaceSubClass      1 Boot Interface Subclass           bInterfaceProtocol      1 Keyboard           iInterface              0              HID Device Descriptor:               bLength                 9               bDescriptorType        33               bcdHID               1.11               bCountryCode            0 Not supported               bNumDescriptors         1               bDescriptorType        34 Report               wDescriptorLength      71              Report Descriptors:                 ** UNAVAILABLE **           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0008  1x 8 bytes             bInterval               8         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        3           bAlternateSetting       0           bNumEndpoints           2           bInterfaceClass       255 Vendor Specific Class           bInterfaceSubClass    240            bInterfaceProtocol      0            iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x01  EP 1 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x02  EP 2 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0      What could be the cause of this problem? Directions on where to start looking would be appreciated.


Routing using second interface

I've got a machine I control running Ubuntu 12.10. I'm on a network that will only allow me to have one device connected. I've also got a USB ethernet adapter. I'd like to create a private network hung off that for eg my Raspberry Pi so I can SSH it and it can access the internet. Can someone please explain the concepts of what I need to do in order to achieve this without mucking up my main network connection? Not knowing exactly what it is I need to do in the vast field of linux routing has made googling somewhat futile.


Find directories and files with permissions other than 775 / 664

I am moving a website from one server to another and Git does not store metadata such as file permissions. I need to find the directories and files that are not 775 / 664 respectively. Right now, I'm using this cobbled-together contraption:               $ find . -type d -exec ls -la {} \; | grep ^d | grep -v ^drwxrwxr-x     $ find . -type f -exec ls -la {} \; | grep -v ^d | grep -v ^-rw-rw-r-- | grep -v '.git'      Though this works, I feel it is rather hacky. Is there a better way to do this, perhaps a canonical way, or should I just be hacky? This is running on a recent Ubuntu version with GNU tools under Bash.


How to write isolinux to an ext4 filesystem

How would I write isolinux to an ext4 filesystem on an 1 GB SD card so that it would boot at startup?


Uninstall a python software properly

I installed a little python software (pycarddav) before to notice there is a packaged version for Debian sid... Now, I would like to uninstall properly this software and then, install the packaged version with apt. Here is what I did to install pycarddav (following its doc):   1. Download pycarddav and extract it   2. Go to the folder and launch `python setup.py install` which contain:               #!/usr/bin/env python2          import os     import string     import subprocess     import sys     import warnings          #from distutils.core import setup     from setuptools import setup          MAJOR = 0     MINOR = 7     PATCH = 0          RELEASE = True          VERSION = "{0}.{1}.{2}".format(MAJOR, MINOR, PATCH)          if not RELEASE:         try:             try:                 pipe = subprocess.Popen(["git", "describe", "--dirty", "--tags"],                                         stdout=subprocess.PIPE)             except EnvironmentError:                 warnings.warn("WARNING: git not installed or failed to run")                  revision = pipe.communicate()[0].strip().lstrip('v')             if pipe.returncode != 0:                 warnings.warn("WARNING: couldn't get git revision")                  if revision != VERSION:                 revision = revision.lstrip(string.digits + '.')                 VERSION += '.dev' + revision         except:             VERSION += '.dev'             warnings.warn("WARNING: git not installed or failed to run")               def write_version():         """writes the pycarddav/version.py file"""         template = """\     __version__ = '{0}'     """         filename = os.path.join(             os.path.dirname(__file__), 'pycarddav', 'version.py')         with open(filename, 'w') as versionfile:             versionfile.write(template.format(VERSION))             print("wrote pycarddav/version.py with version={0}".format(VERSION))          write_version()               requirements = [         'lxml',         'vobject',         'requests',         'urwid',         'pyxdg'     ]     if sys.version_info[:2] in ((2, 6),):         # there is no argparse in python2.6         requirements.append('argparse')          setup(         name='pyCardDAV',         version=VERSION,         description='A CardDAV based address book tool',         long_description=open('README.rst').read(),         author='Christian Geier',         author_email='pycarddav@lostpackets.de',         url='http://lostpackets.de/pycarddav/',         license='Expat/MIT',         packages=['pycarddav', 'pycarddav.controllers'],         scripts=['bin/pycardsyncer', 'bin/pc_query', 'bin/pycard-import'],         requires=requirements,         install_requires=requirements,         classifiers=[             "Development Status :: 4 - Beta",             "License :: OSI Approved :: MIT License",             "Environment :: Console :: Curses",             "Intended Audience :: End Users/Desktop",             "Operating System :: POSIX",             "Programming Language :: Python :: 2 :: Only",             "Topic :: Utilities",             "Topic :: Communications :: Email :: Address Book"         ],     )      How can I remove it properly? Can I use `pip uninstall pycarddav` even if I didn't use pip for the installation?


How to fix Java applications mouse pointer offset in Awesome WM?

How to reproduce in Awesome WM v3.5.2 through 3.5.5 (so far):   1. Install OpenJDK or Oracle **Java 7**. This bug has been observed with both.   2. Start a new Awesome WM session with the **default configuration**.   3. Start either **jEdit** or **PyCharm**. This bug has been observed with both.      * Move the mouse pointer around, and observe how it changes based on whether you are hovering over code, project files or menus. This should work normally.     * Click and release on the _File_ menu, enter one of the sub-menu, and observe how the item directly under the mouse pointer is focused all the time.   4. Press `Mod4`+`Space` repeatedly until the **floating layout** is activated (the application will be almost full screen) _or_ open another application in the same tag. At this point, I would expect the mouse to behave like it does with "normal" applications. Instead I observe the following:   * When clicking and navigating menus with the mouse, the mouse pointer and the focused menu item will be **vertically offset** from each other, seemingly at the same amount of pixels as the height of the status bar.   * When hovering over miscellaneous items as before, the **cursor icon** will be set as if the mouse pointer was higher up on the screen. For example, hovering over the top line of text you will not see a text cursor. It's as if something doesn't detect that the window coordinates have changed. A similar but much more annoying bug happens when you **open another application in the same tag** - the mouse behaviour is **as if the window hadn't moved at all.** When you **toggle another tag which already has an application open** - the "virtual mouse desktop" is moved to the **top left of the primary screen**. Since these bugs have been observed in both OpenJDK and Oracle Java, with different Java applications, it seems very likely that the bug is in Awesome WM. Related question, article. I tried the `_JAVA_AWT_WM_NONREPARENTING` and `wmname` fixes, but no go.


communication between multiple processes

I have a bash script, which runs manager() function as a separate process for x-times. How is it possible to forward messages to all manager() processes from within the script? I've read about anonymous pipes but I have no idea how to share the messages with it.. I tried doing it with named pipes, but it appears that I would have to create a separate named pipe for each process? What is the most elegant way to do this? Here's my code so far:               #!/bin/bash          manager () {         while :         do             echo "read what has been passed to \$line"         done     }          x=1     while [ $x -le 5 ]     do       manager x &       x=$(( $x + 1 ))     done               while :     do     while read line     do       echo "What has been passed through the pipe is ${line}"       # should pass $line to every manager process          done < $1     done          exit 0


Help Deciphering Disk Usage. Where Did the Space Go?

# The System   * An instance running on _Amazon EC2_   * It is an _m1.large_ EC2 instance   * The instance is running _Ubuntu Server 12.04 LTS_ # Here's What Happens... To begin, let's execute the following:               root@host:~# df -h     Filesystem      Size  Used Avail Use% Mounted on     /dev/xvda1      9.9G  6.6G  2.8G  71% /     udev            3.7G  8.0K  3.7G   1% /dev     tmpfs           746M  184K  745M   1% /run     none            5.0M     0  5.0M   0% /run/lock     none            3.7G     0  3.7G   0% /run/shm     /dev/xvdb       414G  199M  393G   1% /mnt      The output above tells us that 199 MB or 1% of `/dev/xvdb` (our ephemeral storage) is in use. However, the output of `ls` tells us the device is pretty much empty.               root@host:~# ls -lah /mnt     total 24K     drwxr-xr-x  3 root root 4.0K Nov 11 11:27 .     drwxr-xr-x 23 root root 4.0K May  1 15:57 ..     drwx------  2 root root  16K Nov 11 11:27 lost+found      What is consuming all the space? # Edit: Additional Information... As advised in the comments below, here is the output of `du -sch /mnt`:               root@host:~# du -sch /mnt     20K     /mnt     20K     total      ... and here is the output of `mount`:               root@host:~# mount     /dev/xvda1 on / type ext4 (rw)     proc on /proc type proc (rw,noexec,nosuid,nodev)     sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)     none on /sys/fs/fuse/connections type fusectl (rw)     none on /sys/kernel/debug type debugfs (rw)     none on /sys/kernel/security type securityfs (rw)     udev on /dev type devtmpfs (rw,mode=0755)     devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)     tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)     none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)     none on /run/shm type tmpfs (rw,nosuid,nodev)     /dev/xvdb on /mnt type ext3 (rw)


What are the legitimate uses of the `touch` command?

What's the point of the `touch` command? I know I can create empty files with it, but so is also the case with `echo -n`. Otherwise, why would someone need to change the timestamps of a file? Unless to create the false impression about the age of a file, I don't see any other use, and this one is not a legitimate one (from my point of view).


Solaris 11 and syslog over TLS

Does Oracle support support remote syslog over TLS/SSL on Solaris **11**? I found it can be done with rsyslog, but is rsyslog default on Solaris 11 **and** if rsyslog is not default, does Oracle support a system with rsyslog (version?) rather than the default Solaris syslog? Anyone experience with this?


ideal live cd distro to build LFS 7.5

I was thinking of building my first LFS system but I can't seem to figure out which live cd distro to use. Because most distros are either out of date or are too fresh. However I did try out a few distros of which are   * fedora20   * archlinux   * linuxmint   * ubuntu 12.10 and 14.04   * lubuntu 14.04   * minisuse   * gentoo but most of them don't seem to meet the host system requirements as stated here. could anyone please suggest me a distro?


How to see what processes WERE running?

Is there a chance to get the processes that **RAN** before my system crash? **EDIT** What I really want is to see the past processes. My system crashed & I want to know if a specific process was the main reason. I search into all /var/log logs, but nothing, the only suspect in this were some apache logs, where I found some kind of scans... So now I want to check out for all processes running at that time.


How to see Current users on the system

I need a script to identify only and only users ( current users ) on the system and what actions they are performing. I use w , but don't show user's actions that are currently performing ... and PS shows me also the machine... I need something that only shows users with their current job!! Will you help me, please?


LXDE: change battery icon in the taskbar

I have installed `LXDE` on `Debian` (LXDE metapackage). I have also installed some additional themes and icons, but when I chage the icons, the battery icon in the task bar stays the same (basically just an ugly green rectange, that does not look anything like a battery) I am wondering, is there some special icon set for task bar icons ? I just want any reasonable battery icon.


Why is this python error message generated whenever I type a nonsense command?

Whenever I type any "nonsense" command, this python error message is generated. Normal commands work fine. Any idea how to debug this?               $ somenonexistingcommand     Traceback (most recent call last):       File "/usr/local/lib/python2.7/site.py", line 553, in <module>         main()       File "/usr/local/lib/python2.7/site.py", line 535, in main         known_paths = addusersitepackages(known_paths)       File "/usr/local/lib/python2.7/site.py", line 268, in addusersitepackages         user_site = getusersitepackages()       File "/usr/local/lib/python2.7/site.py", line 243, in getusersitepackages         user_base = getuserbase() # this will also set USER_BASE       File "/usr/local/lib/python2.7/site.py", line 233, in getuserbase         USER_BASE = get_config_var('userbase')       File "/usr/local/lib/python2.7/sysconfig.py", line 535, in get_config_var         return get_config_vars().get(name)       File "/usr/local/lib/python2.7/sysconfig.py", line 434, in get_config_vars         _init_posix(_CONFIG_VARS)       File "/usr/local/lib/python2.7/sysconfig.py", line 298, in _init_posix         raise IOError(msg)     IOError: invalid Python installation: unable to open /usr/include/python2.7/pyconfig.h (No such file or directory)     $ echo this works fine, however     this works fine, however     $      **EDIT** - after fixing my /usr/bin/python, I now get this different python error message:               $ yetanothernonexistingcommand     Traceback (most recent call last):       File "/usr/lib/command-not-found", line 10, in <module>         import CommandNotFound     ImportError: No module named CommandNotFound      Somehow, python is being run whenever I mistype a command.


How to add a dot to particular lines in LaTeX-document?

I have a LaTeX-document where I have lines of the form               \section*{3.1}     \addcontentsline{toc}{section}{3.1}      or in general               \section*{x.y}     \addcontentsline{toc}{section}{x.y}      for x between 1 and 31 and y between 1 and 12 inclusively, (dates). I would like to change those lines to the form               \section*{x.y.}     \addcontentsline{toc}{section}{x.y.}      Is there some easy script to do that?


Why isn't cron running automatically?

OS : Ubuntu 12.04 Now I want to use Backup and Whenever gem to automatic backup my database. When I connect the server by ssh as an added user to run **backup perform -t my_backup** ,it works well.But the cron file:               0 22 * * * /bin/bash -l -c 'backup perform -t my_backup'      can't run at 22:00. When I use **cat /etc/crontab** check the cron's config file,it is:               SHELL=/bin/sh     PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin          # m h dom mon dow user  command     17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly     25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )     47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )     52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )     #      The **/bin/bash** and **/bin/sh** are different.What's the reason?How to do?


How can I have `date` output the time from a different timezone?

I have a server running with the timezone set to `UTC`. It seemed like that was generally a good practice (please correct me if I'm wrong). Anyhow, one of the servers I connect to, in order to `scp` files, is running on `EDT` and stores files that I need to copy in the format `/path/to/filename/data20120913` I looked at trying to `rsync` files using something like find's `-mtime -1` flag for files modified in the last day, but I didn't have any luck. I don't mind just using `scp` to copy the current day's file, but as of right now there is a 4-hour window where running `date +%Y%m%d` will give a different day on each server and that bugs me a little. Looking through `man date` I see that I can have the time output as `UTC`, but I don't see a way to have it output as another timezone like `EDT` I suppose I could also use something like the `GNU` date extension `date -d 20100909 +%s` to get the date in seconds from the epoch, apply a manual `4 * 60 * 60` second calculation, and see about rendering that as a date - but then when daylight time kicks in it will still be an hour off. Is there a simpler way to output the date in a `YYYYMMDD` format for `EDT` on a server that is set to `UTC` ?


Is there a practical use for the GNU factor command?

Looking through the GNU Coreutils, I spotted the `factor` command, that I had never noticed before. Reading the man page: > Print the prime factors of each specified integer NUMBER. If none are > specified on the command line, read them from standard input. Is there a practical use for `factor`, or is it just a demonstration / toy package?


Ubuntu 10.04 LAMP Virtual Host seems to ignore active sites

**I was going to delete this question, but I couldn't because it has been answered. I am abandoning this question because I am going to replace my desktop install with a server install. We'll see if that fixes it.** I installed LAMP with apache2 on my Ubuntu 10.04 system. It works and serves files from /var/www. I followed the instruction found [here][1]. The new site username is selah and the domain name is selahsanctuary.org. Here's my file, /etc/apache2/sites-enabled/selah               <VirtualHost *:80>         ServerAdmin webmaster@localhost             ServerName selahsanctuary.org             DocumentRoot /home/selah/public_html/         <Directory />             Options FollowSymLinks             AllowOverride None         </Directory>         <Directory /home/selah/public_html/>             Options Indexes FollowSymLinks MultiViews             AllowOverride None             Order allow,deny             allow from all         </Directory>              ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/         <Directory "/usr/lib/cgi-bin">             AllowOverride None             Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch             Order allow,deny             Allow from all         </Directory>              ErrorLog /var/log/apache2/error.log              # Possible values include: debug, info, notice, warn, error, crit,         # alert, emerg.         LogLevel warn              CustomLog /var/log/apache2/access.log combined              Alias /doc/ "/usr/share/doc/"         <Directory "/usr/share/doc/">             Options Indexes MultiViews FollowSymLinks             AllowOverride None             Order deny,allow             Deny from all             Allow from 127.0.0.0/255.0.0.0 ::1/128         </Directory>          </VirtualHost>      I verified that /home/selah/public_html/index.html exists. If I visit http://selahsanctuary.com, I get the file served from /var/www. I found a suggestion that I add /etc/apache2/conf.d/virtual.conf with this line: `NameVirtualHost *` but that caused an error so I removed it. Then I found a suggestion to add a line in /etc/host like `127.0.0.1 selahsanctuary.org`. I did and restarted apache2. No help. So finally, I ask, what should I try next? Do I have a typo somewhere? I tried to simplify and found another sample of a site-available file like this:               <VirtualHost selahsanctuary.org>     ServerAdmin webmaster@localhost     #We want to be able to access the web site using www.selahsanctuary.org or selahsanctuary.org     ServerAlias www.selahsanctuary.org     DocumentRoot /home/selah/public_html          #we want specific log file for this server     CustomLog /home/selah/selah-access.log combined     </VirtualHost>      and I edited my /etc/hosts file so there is now a line like this: `127.0.0.1 localhost www.selahsanctuary.org selahsanctuary.org` but it still serves the file from /var/www (I did remember to a2ensite selah and /etc/init.d/apache2 reload)


How do I recover/kill an SSH session after losing connection?

I lost my connection while I was logged via SSH into my university server. Classic. Now I can't log in since the session appears to be still running and I get the error "Too many logins for 'myuser'". (Only 1 login for each user is allowed) Is there a way to recover the session _not_ having another access to the server (I can't reach any sysadmin until monday) - or the only way is just to wait for the session to time out? Typically how long should I wait? More than an hour has already passed.


Gedit opening an "Unsaved document" on opening files with mouse

When I open files by double-clicking a file with mouse I always get one additional "Unsaved Document X".. which is very annoying, because I have to close tham all, and click "Close without save" every time... This happens in dolphin, nautilus and krusader (those are the ones where I tried it, so I gues it's not because of a file manager). When I try opening a file from terminal using "gedit filename" the problem is not there. It also does not happen if I open files from within gedit. Any hints on how to fix this? This started happening I think somewhere around the time when gnome3 came into Arch official repos. (I use up-to-date Arch and KDE4.6)


Delete files that exist in the source with rsync

I have a folder on server "A" called `./delete`. I want to delete everything in the folder `./stuff` on server "B" that exists in the `./delete` folder on server "A". Its like the reverse of rsync. instead of transferring files from `a:/delete` to `b:/stuff` I want to just delete all the files that are in both places on server "B". like a `\--delete-on-destination` flag or something.


Looking for a GUI application to enter linux commands

I am looking for a GUI console where I can enter Linux commands in an entry widget and the result will be output in a text area widget. Is there is such software available? Something like this: ![enter image description here](http://i.stack.imgur.com/IQ980.png) In console programs like `gnome-terminal` or `xterm`, the screen keeps scrolling with every new command, and I find this annoying specially when the result has a few dozen lines. I would like to visualize the command and the result at the same time, alike a browser entering a web address in the address bar and obtaining the website as a result. I am wondering is there is an implementation of such a software in a language like Python, Tcl, Ruby or even Java.


Executing a shell command from PHP with shell_exec

Included in my thesis is to create an administration interface, in which an administrator can approve users whom have asked for access to use OpenNebula. Upon approval the users should be added to OpenNebula (i.e. it corresponds to the command `oneadmin createuser username password`). (More information of the interface (section 4.2).) I am trying to perform this with an execution of a shell command in a PHP file. Why doesn't this work (below is just a specific example - not the general code that I am using)?               $execQuery = "/bin/su oneadmin postgres -c '/usr/bin/oneuser create test10 test10'";     shell_exec ($execQuery); //execute query in shell.      Nor does this work (even though I am logged in as oneadmin, when the script is executed by PHP):               shell_exec ("/usr/bin/oneuser create test10 test10");      It works when I type that command in the shell. I have tried to execute other shell commands through php and those work fine, so I wonder where the problem lies. I have given the file `/usr/bin/oneuser` `rwx` rights for all users.


Traffic counter on openwrt?

Are there any (not a resource hog) solutions to have statistics about the traffic on an OpenWrt router? :O e.g.: traffic per IP address, monthly statistics, etc. :O


Java is constantly generating an error log in my home directory?

I have started to notice that whenever I use a Java-based application on Fedora 20, whether it's a game or Eclipse or something else, it will always generate an error log of some sort in home directory. This is an annoying place for logs to be saved in the first place, but I obviously would like to fix whatever error it is referencing. But I am not quite sure what it is saying or how I would go about fixing this. The name of the error logs are always `abrt_checker_####.log`, the #### being a series of random numbers. Below is an example of what one of these error logs look like. So, my question is, **what does this error mean and how I can I fix it?**               Uncaught java.lang.ClassNotFoundException exception in thread "main" in a method java.lang.ClassLoader.loadClass() with signature (Ljava/lang/String;Z)Ljava/lang/Class;     Exception in thread "main" java.lang.ClassNotFoundException: .usr.lib64.eclipse..plugins.org.eclipse.equinox.launcher_1.3.0.v20131104-1241.jar     at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [jar:file:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/jre/lib/rt.jar!/java/net/URLClassLoader$1.class]     at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [jar:file:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/jre/lib/rt.jar!/java/net/URLClassLoader$1.class]     at java.security.AccessController.doPrivileged(Native Method) [jar:file:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/jre/lib/rt.jar!/java/security/AccessController.class]     at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [jar:file:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/jre/lib/rt.jar!/java/net/URLClassLoader.class]     at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [jar:file:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/jre/lib/rt.jar!/java/lang/ClassLoader.class]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) [jar:file:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/jre/lib/rt.jar!/sun/misc/Launcher$AppClassLoader.class]     at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [jar:file:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64/jre/lib/rt.jar!/java/lang/ClassLoader.class]


Are short-lived files flushed to disk?

My program creates many small short-lived files. They are typically deleted within a second after creation. The files are in an ext4 file system backed by a real hard disk. I know that Linux periodically flushes (`pdflush`) dirty pages to disk. Since my files are short-lived, most likely they are not cached by `pdflush`. My question is, does my program cause a lot of disk writes? My concern is my hard disk's life. Since the files are small, let's assume the sum of their size is smaller than `dirty_bytes` and `dirty_background_bytes`. Ext4 has default journal turned on, i.e. metadata journal. I also want to know whether the metadata or the data is written to disk.


OpenSolaris vs. Debian for Xen Hypervisor VM server

all. I've just purchased a computer that I'd like to repurpose as a lab server. It's a six-core AMD processor with 8 gigs of ram (16 gig max) and a terabyte hard drive. My idea is to hose Windows, install a unix-based system on it, and use it to host a lot of virtual guests. I've been looking at my virtualization options, and I've decided to go with Xen - I've never used it before, but it looks like it has good support and I've heard good things about it. (My only experience with virtual hosts has been with VMware on Debian.) Debian would be my first choice as an OS because I'm familiar with it's setup and package management tools, and I know that Xen is supported on Debian. However, OpenSolaris has ZFS, which is pretty compelling. Has anyone had any experience doing something like this? I'm torn between going with what I know (Debian) or trying my hand with OpenSolaris just for the ZFS filesystem (which is, from what I understand, VERY awesome). Does Xen even run on OpenSolaris? All of my searches have turned up information about OpenSolaris as a virtual guest, not a virtual host. Discussion and experiences are welcome. If this is a bad question, or if I need to give more details, please let me know. Thanks! Edit: Virtualization options are welcome, as well. Xen looks interesting, but I am by no means tied to it. Since this will be a personal lab server, I'm willing to try different methods.


Default to "Execute" when double-clicking on a shell script in PCManFM

Is it possible to get an executable to execute by default? What I mean is this. I have an `.sh` file, which if I click on twice, it will show me this: ![enter image description here](http://i.stack.imgur.com/XeqQw.png) If I then click `Execute`, it does the right thing. Is it possible to get it to `Execute` without being shown the `Execute File` dialog box? So simply by double clicking the `.sh` file, it should do its thing without showing me the `Execute File` dialog box. I am using Lubuntu/PCManFM if that info is needed.


How to persist a file in /usr/local in embedded FreeNAS

I have embedded FreeNAS, version 8.2 beta. Now I would like to install openvpn, of course persisting between updates. I have managed to get the program itself persist by using               mount -wu /     pkg_add -r openvpn     mount -ro /      Also I got the the `openvpn_enable="YES"` line to persist by editing `/conf/base/etc/rc.conf` My problem is to persist the `/usr/local/etc/openvpn` folder with therein my `openvpn.conf` configuration and key files. How can I persist those?


How to restart polkitd?

My desktop PC is also used as a NIS/NFS server for a small workgroup. It runs for months without reboot. Recently I observed that when I log into a desktop session the computer becomes less responsive for several minutes. A `polkitd` process in a `D` state generates a lot of disk I/O activity. Its VmSize is over 600MB and its VmRSS is over 400MB. The machine is still on OpenSUSE 11.3 with polkit 0.96. I plan to upgrade in the summer. There are several reports of memory leaks in polkitd that were fixed in 0.98 (freedesktop.org, opensuse.org). While upgrading will probably solve the problem it would take about a day and I am looking for a quick fix. There is no polkitd script in /etc/init.d and the parent for the polkitd process is `init` itself.                   PID  PPID USER     CMD           ....       22362     1 root     /usr/lib/polkit-1/polkitd      **Question:** How do I restart polkitd without rebooting the system? Can I do it from within a desktop session or should I log off the desktop session and log on to the text console?


Pretty print mails from mutt?

I know that I can configure a print command in Mutt via `.muttrc`, e.g.:               set print=ask-yes     set print_command="..."      But what print command should I use for _pretty_ printing? Well, `a2ps` output seems a little bit spartan, even with the `-=mail` shortcut. It does not support UTF8. There is `paps` which is described as 'UTF-8 to PostScript converter using Pango' and currently does not include support for margins, or Email layout or something like that. `mp`: nice default header. Again no UTF8 support. Default margins are ridiculously small - if you specify wider margins the body text is printed behind the footer. `enscript`: `-G` for fancy page headers is indeed fancy. No UTF8 support. What do you use in the 21st century to print your mails from Mutt? (It should support UTF8, DIN A4 output as PS and/or PDF)


How to install Rekonq 1.0 on Fedora 17?

I would like to install Rekonq 1.0 on Fedora 17, using KDE 4.8.5. At the moment, this version of Rekonq isn't available in the repositories, I have version 0.9.2. Anyone knows how can I update my app?


What's wrong with this csh file?

I don't have any experience writing .sh files. I want to run the pvm2raw utility of this app from the Volume Library. I get the following error when running build.sh in Ubuntu 10.10. ![enter image description here](http://i.stack.imgur.com/QmZ0u.png) build.sh is as follows:               # make command     set mmfile=V3Makefile     set make="make -f $mmfile"          set rule=$1     if ($rule == "") set rule="all" // line 16          if ($rule == "deps") then        if ($HOSTTYPE == "iris4d") $make MAKEDEPEND="CC -M" OPTS="-DHAVE_CONFIG_H -DVIEWER_HAVE_DCMTK" TARGET=IRIX depend        if ($HOSTTYPE == "i386") $make MAKEDEPEND="c++ -M -I/usr/X11R6/include" OPTS="-DHAVE_CONFIG_H -DVIEWER_HAVE_DCMTK" TARGET=LINUX depend      What's wrong there? Edit: I followed jw013's advice and installed csh. Now I get the following error: ![enter image description here](http://i.stack.imgur.com/wMIMY.png) How can I solve this Undefined variable problem?


How to use /dev/fb0 as a console from userspace, or output text to it

So I have a Palm Pre (original P100EWW) model that I enabled developer mode on, and installed a Debian Squeeze chroot. Works great. I have plans to use this for ANYTHING (bittorrent peer, web server) but a phone. I noticed if I do a `cat /dev/urandom > /dev/fb0` it actually writes random pixels to the screen until a `No space left on device` error is generated. Awesome, now I can use the display. So what kind of utilites are there that will either A) let me use /dev/fb0 as a console I can output text to or B) render text on /dev/fb0 from the command line. I don't know about recompiling the kernel for this yet (I'd love to eventually strip WebOS off entirely and turn this into a minimal ARM server) so userspace tools if they exist is what I'm asking about. Also would prefer to render directly to /dev/fb0 and not use X.


Specifying outgoing interface for SSH tunnel

I have a machine with two public IP addresses on two interfaces. This machine is running `sshd`. Is there a way to specify, when creating a tunnel with a SOCKS interface (i.e. `-D`), which interface to use for outgoing connections?


How does umask affect ACLs?

Can someone explain to me how `umask` affects the default mask of newly created files if ACLs are activated? Is there some documentation about this? Example:               $ mkdir test_dir && cd test_dir     $ setfacl -m d:someuser:rwx -m u:someuser:rwx .  # give access to some user     $ getfacl .     # file: .     # owner: myUsername     # group: myGroup     user::rwx     user:someuser:rwx     group::---     mask::rwx     other::---     default:user::rwx     default:user:someuser:rwx     default:group::---     default:mask::rwx     default:other::---     $ umask # show my umask     077     $ echo "main(){}" > x.c # minimal C program     $ make x # build it     cc     x.c   -o x     $ getfacl x     # file: x     # owner: myUsername     # group: myGroup     user::rwx     user:someuser:rwx           #effective:rw-     group::---     mask::rw-     other::---      I would expect `mask:rwx`. Actually after setting `umask` to e.g. `027` I get the expected behavior.


Is there parallel wget? Something like fping but only for downloading?

I've found only puf (Parallel URL fetcher) but could to get it work with reading urls from file and something like                puf < urls.txt      does not work either. The operating system installed on the server is ubuntu.


Dynamically changing the proxy server for all outgoing traffic

I have three proxy servers in my college, all of them are connected to three different service providers. At different instant of time, different proxies give different speed (depending the number of users using that proxy at that instant of time). I feel that changing the proxy server configuration in browser(or at any other network appl.) at different instant of time are very time-consuming. I want to write one script which can change the proxy server used by all of my network applications at different instant of time dynamically by doing some kind of test. I am not able to start with it. Can somebody please give me some idea so that I can implement it.


Where are temporary files used for installation stored?

Where are installation temporary files stored by pacman in Arch Linux?


change interrupt smp_affinity

As you can see below, nvidia is sharing the intrerrupt and the interrupt is using only CPU0, how can I change the interrupt for nvidia, and how can I make it use both CPU's ?   Here is an article describing the second question, I can change between CPU0 and CPU1 by modifing smp_affinity, but did not understand how can I set it to use both CPU's. Acording to this blog setting smp_affinity to 3 should use both CPU0 and CPU1. Actualy in my case, it uses CPU0 (behaving like it was set to 1). Setting it to 2 uses CPU1.               radu@radu-work:~$ cat /proc/interrupts                CPU0       CPU1              0:         79          0   IO-APIC-edge      timer       1:          9      17152   IO-APIC-edge      i8042       4:          2          0   IO-APIC-edge           6:          5          0   IO-APIC-edge      floppy       7:          0          0   IO-APIC-edge      parport0       8:          1          0   IO-APIC-edge      rtc0       9:          0          0   IO-APIC-fasteoi   acpi      12:     694613          0   IO-APIC-edge      i8042      16:    1233922          0   IO-APIC-fasteoi   uhci_hcd:usb3, ahci, nvidia      17:       3961     168757   IO-APIC-fasteoi   uhci_hcd:usb4, pata_jmicron      18:          0          0   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb7      19:         59          0   IO-APIC-fasteoi   ata_piix, ata_piix, uhci_hcd:usb6      22:        819       6915   IO-APIC-fasteoi   HDA Intel      23:          2          0   IO-APIC-fasteoi   ehci_hcd:usb2, uhci_hcd:usb5, eth               radu@radu-work:~$ sudo cat /proc/irq/16/smp_affinity      1          root@radu-work:~# uname -a     Linux radu-work 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 i686 GNU/Linux      Thank you. **EDIT:** I am triyng to get my Linux box to play HD movies (at least 720). I have an nvidia 66xx series, Linux version Ubuntu 11.04, I have nvidia proprietary drivers instaled, but they do not suport hardware acceleration (and video decoding) for old harware (just 8xxx series and above) so the decoding is done in software. When I try to see a HD movie the image frozes for a few seconds, works a couple of seconds then frozes again. The CPU usage cougth my attention, nvidia drivers were using just one CPU, so I thouth that if I can make nvidia use both CPU's maybe I will have a better performance, and be able to finaly watch HD movies on my Linux box. By the way, I have tried every posible Linux player: mplayer (even nightly builds), totem, vlc and many more ... **EDIT:** irqbalance --debug               root@radu-work:/# irqbalance --debug     Package 0:  cpu mask is 00000001 (workload 0)             Cache domain 0: cpu mask is 00000001  (workload 0)                      CPU number 0  (workload 0)                     CPU number 0  (workload 0)     Package 0:  cpu mask is 00000003 (workload 0)             Cache domain 0: cpu mask is 00000003  (workload 0)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)     Interrupt 44 (class ethernet) has workload 7      Interrupt 0 (class timer) has workload 0      Interrupt 16 (class storage) has workload 122      Interrupt 17 (class storage) has workload 29      Interrupt 19 (class storage) has workload 0      Interrupt 45 (class legacy) has workload 2      Interrupt 1 (class legacy) has workload 2      Interrupt 12 (class legacy) has workload 0      -----------------------------------------------------------------------------     IRQ delta is 152640      Rescanning cpu topology      Package 0:  cpu mask is 00000001 (workload 0)             Cache domain 0: cpu mask is 00000001  (workload 0)                      CPU number 0  (workload 0)                     CPU number 0  (workload 0)     Package 0:  cpu mask is 00000003 (workload 0)             Cache domain 0: cpu mask is 00000003  (workload 0)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)     Package 0:  cpu mask is 00000001 (workload 16)             Cache domain 0: cpu mask is 00000001  (workload 16)                      CPU number 0  (workload 3)                       Interrupt 44 (ethernet/2)                      CPU number 0  (workload 0)               Interrupt 17 (storage/9)                Interrupt 19 (storage/0)                Interrupt 45 (legacy/0)                Interrupt 12 (legacy/0)      Package 0:  cpu mask is 00000003 (workload 42)             Cache domain 0: cpu mask is 00000003  (workload 42)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)               Interrupt 16 (storage/40)                Interrupt 1 (legacy/0)           -----------------------------------------------------------------------------     ...     -----------------------------------------------------------------------------     IRQ delta is 10      IRQ delta is 10, switching to power mode      Rescanning cpu topology      Package 0:  cpu mask is 00000001 (workload 0)             Cache domain 0: cpu mask is 00000001  (workload 0)                      CPU number 0  (workload 0)                     CPU number 0  (workload 0)     Package 0:  cpu mask is 00000003 (workload 0)             Cache domain 0: cpu mask is 00000003  (workload 0)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)     Package 0:  cpu mask is 00000001 (workload 38)             Cache domain 0: cpu mask is 00000001  (workload 38)                      CPU number 0  (workload 36)                       Interrupt 44 (ethernet/35)                      CPU number 0  (workload 0)               Interrupt 16 (storage/0)                Interrupt 1 (legacy/0)      Package 0:  cpu mask is 00000003 (workload 4)             Cache domain 0: cpu mask is 00000003  (workload 4)                      CPU number 0  (workload 0)                     CPU number 1  (workload 0)               Interrupt 19 (storage/0)                Interrupt 17 (storage/0)                Interrupt 45 (legacy/0)                Interrupt 12 (legacy/0)


Where are recognizers for media types stored and how to add one?

When one writes a html file, linux can state that the MIME-type is text/html. How is this handled? Where are the "recognizers" stored? How can one add a MIME type with with an implemented recognizer?


Using sed to edit lines in a file with a variable

I need to edit lines in a file using `sed`. Now the problem is I am replacing a particular pattern with a combination of text and number. This number is a variable which keeps on incrementing for every subsequent line. Now as `sed` executes the command for all lines in one go, it is replacing the pattern found with the text and fixed number (i.e initial value of number). For example:               k = 10     sed "s/raj/ram${k++}/"


debian update-problem

When I run `sudo apt-get upgrade`:               libc6-i386:dependency: libc6 (= 2.17-93) but 2.17-92+b1 have been installed;      so `dpkg` gives an error and all the updates can not continue. If I try `sudo apt-get -f install`:               A copy of the C library was found in an unexpected directory:     '/lib/x86_64-linux-gnu/libc-2.17.so'     It is not safe to upgrade the C library in this situation;     please remove that copy of the C library or get it out of     '/lib/x86_64-linux-gnu' and try again.          dpkg: error processing /var/cache/apt/archives/libc6_2.17-93_amd64.deb (--unpack):      I have opened the multiarch support. It's the libc6-i386 problem. Is there anyone that has seen this problem before? What should I do? I have searched some kind of solution which refers to chroot way, a little bit complicated. And I have checked the bug list of debian. It seems like that a long time ago someone has reported the same problem.


Debian: version numbers (now/then) and changelog for all upgradable packages

I'm currently have both Lenny and Squeeze installations. I want to know how to:   * list of all packages which are upgradable   * know their current and future package numbers   * have the changes (ChangeLog) for all of them between current/future version numbers   * without actually upgrading anything As a plus, I'd get this information without super user rights. When I do `aptitude update && aptitude upgrade` I only see the packages; when I've installed `apt-listchanges` I only see them once I commited to installed them (yes, I know I can abort it). Maybe I do not yet want to download all of the packages ( _could_ be a lot of them), which means I'd have to fetch the ChangeLog from somewhere else (but this is not a requirement; downloading them would fit too, but would require super user rights). **Update** A deleted answers mentioned to take a look at `apt-listchanges`. Despite sounding redundant given my question, it's true that I didn't realize I can use `apt-listchanges` alone. The man page mentions the option `\--apt` but I fail to understand which _pipeline_ I need to construct (and if it meets my goals). **Update 2** I figured that with `apt-show-versions` I get a nice output; it's just that the ChangeLog is missing:               $ apt-show-versions -u     apache2/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2     apache2-mpm-worker/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2     apache2-utils/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2     apache2.2-bin/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2     apache2.2-common/squeeze upgradeable from 2.2.16-6+squeeze1 to 2.2.16-6+squeeze2


What Linux tool will tell me if all the mounted disks share roughly the same bandwidth? Can I do something like iostat for each of my /dev/sd* devices?


performance on Linux system when daisy-chaining multiple USB hard-drives on USB hubs?

What would the I/O access be like as I plug many USB drives into a Linux system with only 2 USB 2.0 ports and 1 USB 3.0 port? I expect I will have to have multiple levels of fan-out by plugging hubs into hubs to maximize the number of devices on each USB port.


Debian PPC on PowerMac G5 boots to blank screen

As a side project, I thought I'd try to throw Debian (squeeze) on an old G5 PowerMac. It installed just fine, but after the bootloader and kernel boot-up output, the screen goes blank. Looks like a video mode problem or something, but I can't find where to change it. X isn't installed, so it should be booting to a login prompt. Any ideas? **Edit:** I'm having the same exact issue and what I've been doing after it going blank has been to look into `/var/log/messages` from the `rescue64` system on the installation CD. And indeed it turns out that the lines I see briefly before the screen flickers and goes blank went into the log. They are (I had to type it, because I didn't manage to get this off the machine from the rescue system):               [drm] Initialized drm 1.1.0 20060810     [drm] nouveau 0000:f0:10.0: Detected an NV30 generation card (0x034100b1)     [drm] nouveau 0000:f0:10.0: OF bios successfully copied (2403 bytes)     [drm] nouveau 0000:f0:10.0: Attempting to load BIOS image from PROM     [drm] nouveau 0000:f0:10.0: ... BIOS checksum invalid     [drm] nouveau 0000:f0:10.0: Attempting to load BIOS image from PRAMIN     [drm] nouveau 0000:f0:10.0: ... BIOS checksum invalid     [drm] nouveau 0000:f0:10.0: Attempting to load BIOS image from PCIROM     [drm] nouveau 0000:f0:10.0: ... BIOS signature not found     [drm] nouveau 0000:f0:10.0: Using BIOS image from PRAMIN     [drm] nouveau 0000:f0:10.0: BMP BIOS found     [drm] nouveau 0000:f0:10.0: BMP version 5.39     [drm] nouveau 0000:f0:10.0: Bios version 04.34.20.19     [drm] nouveau 0000:f0:10.0: Found Display COnfiguration Block version 2.2     [drm] nouveau 0000:f0:10.0: Raw DCB entry 0: 01100102 00000000     [drm] nouveau 0000:f0:10.0: Raw DCB entry 1: 01000100 000088b8     [drm] nouveau 0000:f0:10.0: Raw DCB entry 2: 02110212 11b00000     [drm] nouveau 0000:f0:10.0: Raw DCB entry 3: 02010210 11b088b8     [drm] nouveau 0000:f0:10.0: Raw DCB entry 4: 02010211 11b00003     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 0 at offset 0x020A     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 1 at offset 0x0457     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 2 at offset 0x059D     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 3 at offset 0x0723     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 4 at offset 0x0740     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 5 at offset 0x075D     [drm] nouveau 0000:f0:10.0: Parsing VBIOS init table 6 at offset 0x08E2     [TTM] ZOne  kernel: Available graphics memory: 609784 kiB.     [drm] nouveau 0000:f0:10.0: 64 BiB VRAM     [drm] nouveau 0000:f0:10.0: 64 MiB GART (aperture)     [drm] nouveau 0000:f0:10.0: Allocating FIFO number 0     [drm] nouveau 0000:f0:10.0: nouveau_channel_alloc: initialised FIFO 0     [drm] nouveau 0000:f0:10.0: Initial CRTC_OWNER is 0     [drm] nouveau 0000:f0:10.0: Detected a DVI-I connector     [drm] nouveau 0000:f0:10.0: Detected a DVI-I connector     [drm] nouveau 0000:f0:10.0: Detected a TV connector     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on tmds encoder (output 0)     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on vga encoder (output 1)     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on tmds encoder (output 2)     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on vga encoder (output 3)     [drm] nouveau 0000:f0:10.0: Setting dpms mode 3 on TV encoder (output 4)     composite sync not supported     windfarm: SMU failed new fan command falling back to old method     [drm] nouveau 0000:f0:10.0: Load detected on output B     [drm] nouveau 0000:f0:10.0: allocated 720x576 fb: 0x49000, bo c00000004945e000     Console: switching to colour dummy device 80x25     Trying to free nonexistent resource <0000000098004000-000000009807bfff>     Console: switching to colour frame buffer device 90x36     [drm] nouveau 0000:f0:10.0: Setting dpmc mode 0 on TV encoder (output 4)     [drm] nouveau 0000:f0:10.0: Output TV-1 is running on CRTC 1 using output B     fb0: nouveaufb frame buffer device     registered panic notifier     [drm] Initialized nouveau 0.0.15 20090420 for 0000:f0:10.0 on minor 0      Please note: `nosplash video=ofonly fb=false` has been appended to the kernel command line and that does _not_ help. Also, these parameters were added by default (the installer did that). Also note: changing it to `nosplash fb=false` doesn't change a thing. One more thing: the the `rescue64` environment from the installer CD works perfectly fine. It also seems to switch resolutions (or perhaps just the fonts?) but doesn't end up with a blank screen ...


A Live Linux Distro which is as small as possible (no X, no networking, bash)

I've been trying to find a Linux distribution to fit my needs but I need something that seems to be more minimal then "minimal" distributions (Eg: Microcore Linux) seem to provide. I don't need X, I don't need networking, I need something that can launch a bash script, which runs a modified version of dc3dd, which talks to a serial device and outputs information to a user via the normal console and nothing else. It'll be booted from read only media (Probably a disc but could also be write protected SD card) and will run on x86 platforms. It'll need to access SATA/IDE hard drives. I don't have any memory limitations but anything that isn't being used needs to be gone. Can anyone point me in the right direction or perhaps to a tool which can build something I am looking for? I'm hoping to spend as little time as possible on altering an existing distribution so I can focus on the application itself.


Mounting a partclone image

I'm having a really strange issue. I have backups of my machine in a local RAID array. They were created by Clonezilla, so I've created an actual filesystem image like so:               cat 2013-11-29/sda3.btrfs-ptcl-img.gz.* | gzip -d -c | \         partclone.restore -C -s - -O 2013-11-29.sda3.img      This has created a nice big image file in the current directory. However, when I go to mount it, I've noticed that it doesn't actually mount the image file; it simply creates a loop to `/`:               $ sudo mount 2013-11-29.sda3.img /mnt      To test this, I've created a simple file that shouldn't exist in the backup.               $ ls /home/naftuli | grep "newfile"     $ ls /mnt/home/naftuli | grep "newfile"     $ touch ~/newfile      I would expect that now, `/home/naftuli/newfile` exists, but `/mnt/home/naftuli/newfile` does _not_ exist. However, it is apparent that the mount is looping to `/`, as the `newfile` exists in _both_ places:               $ ls /home/naftuli | grep "newfile"     newfile     $ ls /mnt/home/naftuli | grep "newfile"     newfile      How can I force `mount` to mount the image file and specifically not loop to `/`?


Need advice to install Unix-like OS on my Laptop

I'm a CS undergraduate, and I'm a newbie to the Unix-like OSs. We used Fedora in our labs, but I've not mastered it. I've installed Windows 7 on my laptop and I want to install this Unix-based OS. These are my laptop capabilities:   * Processor : Intel i3   * Memory : 4GB DDR3   * Storage : 320GB I think other details are not needed. Are those capabilities is enough? If so, which distribution should I use?


A Linux Distribution under 8MB RAM?

I have recently acquired for free a laptop from 1995. I haven't tried turning it on yet, (no power cord, should have one soon though), but I noticed that it has 8mb of RAM in it, and I currently have no way to know what size the hard drive is. On top of this, the only way to add any software to this is via a floppy disk drive. I have no idea what type of architecture this build has, as I cannot find any resource on this brand of laptop (swan?). Is there a version of Linux that would run on this machine?


Add a user for Postgres on Mac

I've had a very difficult time trying to set up a postgres database. I am using Mac OS X 10.9.2. I am using this tutorial: http://tutorials.jumpstartlab.com/topics/environment/environment.html The Postgres section can be found 2/3 of the way down the page. After installing Homebrew and commanding `brew install postgresql` we create a database by:               sudo mkdir -p /usr/local/pgsql/data     sudo chown postgres:postgres /usr/local/pgsql/data     sudo su postgres     initdb -D /usr/local/pgsql/data     createuser `whoami`      When I do               sudo chown postgres:postgres /usr/local/pgsql/data      it returns the error               chown: postgres: illegal user name      I can't seem to find a simple command to add a user - adduser and useradd have returned "command not found", with and without sudo. I am not sure what the problem is. Is there a simple command I can do?


Find the top 50 directories containing the most files/directories in their first level?

How can I use `find` to generate a list of directories which contain the most numbers of files. I'd like the list to be from highest to lowest. I'd only like the listing to go 1 level deep, and I'd typically run this command from the top of my filesystem, i.e. `/`.


search and replace string

I have a XML tag for example               <tag name="abc"></tag>      I wanted to replace the string inside "" with the tag name i.e the upper XML tag should be become now               <abc name="abc"></abc>


How to get the output inside `screen` out to a script?

I have a `screen` instance running (a lot more actually, but only one that matters), and I would need to execute some code inside the `screen`, and get the result out to my script. The first part is quite easy, I just `screen -S session_name -X eval 'stuff "$cmd"\015'`.   (I'm no `screen` expert, I just modified a line I found in a script, but I understand it... Not sure there's no better way to do it, though) The second part, getting out the output, is trickier. For my current need, I only need the last line, but it'd be better if I can get the whole output, whatever it's size _(for future uses)_.


Virtual always connected network interface with static IP?

How do I create a virtual, always connected network interface with a static IP on Linux? It must work when all my physical interfaces are disconnected. Looking for general information regarding this, can be for any distribution (Debian, CentOS, Arch Linux etc.)


How to block outgoing connections from process/user on FreeBSD?

My server executes third party software which processes user submitted files. I want to block outgoing connections from my process. How can I do it in FreeBSD?


How do i open all files that are the result of a ls command?

I'd like to open all text files that are the result of a ls command using a text editor. How do i do this?


Script to monitor folder for new files?

How do I detect new files in a folder with a bash script? I would like to process the files as soon as they are created in the folder. Is this possible to do so or do I have to schedule a script with cron that that check for new files each minute or so?


Is there a way to cat files as they are created?

Unlike the answer to this question (Can a bash script be hooked to a file?) I want to be able to see content of files that haven't been created yet **as or after they are created**. I don't know when they will be created or what they will be named. That solution is for a specific file and actually mentions in the question title creating a "hook" to a specific file. My question is different because I don't want to hook anything, and what I do want is not specific to a particular file. My question's title specifies "..as they are created" which should be a clue that the files I am interested in do not exist yet. I have an application that users use to submit information from a website. My code creates output files when the user is finished. I want to be able to see the content of these files as they are created, similar to the way `tail -f` works, but I don't know ahead of time what the filenames will be. Is there a way to cat files as they are created or would I have to somehow create an endless loop that uses `find` with the `-newermt` flag Something like this is the best I can come up with so far:               #!/bin/bash     # news.sh          while true     do       d=$(date +"%T Today")       sleep 10       find . -newermt "$d" -exec head {} +     done      For clarification, I don't necessarily need to tail the files. Once they are created and closed, they will not be re-opened. Existing files will never change and get a new modification time, and so I am not interested in them.


full disk encryption (including swap, possibly plausible deniability as well)

I'm looking for a method to encrypt my laptop including the swap partition. I also read trough older similar questions but mostly the answer included just a **_what_** not much of a **_how_**. (Currently I'm working on a 128GB SSD & Debian Jessie) My aim is to have   * a state of the art encryption   * fully encrypted disk (including swap)   * a single password on boot for decryption   * automatic encryption on hibernate/suspend nice to have would also be a second password to boot to a second valid OS for plausible deniability.


What is the GNOME Classic Monospace font?

I am moving to Cinnamon from GNOME Classic. I would like to bring the terminal font from GNOME. In Cinnamon the fixed width system font is also called Monospace but it looks different. Is there another name for the GNOME default terminal font?


FileZilla: Failed to retrieve directory listing

I am running Ubuntu 12.04 as the host and installed Ubuntu 14.04 in the Virtualbox as Guest OS.   I have installed and configured VSFTPD on Ubuntu 14.04 and forwarded the virtualbox port's as follows: ![enter image description here](http://i.stack.imgur.com/D5Q1C.png) Now i am using FileZilla in my host OS in order to access into the guest OS.   Here is the FileZilla login detail:   **Host:** 127.0.0.1   **Username:** hasan   **Password:** ***********   **Port:** 8181   Now i press the **Quickconnect** button to access into the guest os.   Login was success but filezilla was unable to access into the guest os!.   Here is the messages:                 Status: Connecting to 127.0.0.1:8181...     Status: Connection established, waiting for welcome message...     Response:   220 (vsFTPd 3.0.2)     Command:    USER hasan     Response:   331 Please specify the password.     Command:    PASS ******     Response:   230 Login successful.     Command:    OPTS UTF8 ON     Response:   200 Always in UTF8 mode.     Status: Connected     Status: Retrieving directory listing...     Command:    PWD     Response:   257 "/home/hasan"     Command:    TYPE I     Response:   200 Switching to Binary mode.     Command:    PASV     Response:   227 Entering Passive Mode (10,0,2,15,224,245).     Command:    LIST     Error:  Connection timed out     Error:  Failed to retrieve directory listing      I was unable to fix this. Any idea?


What does redirection with >| do?

When should you use `>|` for redirecting output to a file instead of just `>`? The explanation given when I was shown this was that it guaranteed the target file was truncated first. But I thought `>` already implied that. Is `>|` useful?


Extract a part of one line from a file with sed

I want to read one part of one line from a file. For example: > POP3_SERVER_NAME = localhost I want to return only `localhost`, using sed. This text is on the third line. I do this to extract the line:               sed -n '3p' installation.sh      How do I extract only the `localhost` part?


Reverse dns using dns server of domain

I need to check a reverse dns using the DNS servers of some domains. But I'm having some problems.               dig -x 212.26.146.21 +short     mx20.gypost.com.      all ok               dig -x 212.26.146.21 @8.8.8.8 +short     mx20.gypost.com.      its ok too               dig SOA google.com +short      ns1.google.com. dns-admin.google.com. 2014021800 7200 1800 1209600 300          dig -x 212.26.146.21 @ns1.google.com +short      empty I can't find reverse address using NS record of any domain. What i do wrong? And how i can check my reverse address using dns server of gmx.com, for example.


How can I execute `date` inside of a cron tab job?

I want to create a log file for a cron script that has the current hour in the log file name. This is the command I tried to use:               0 * * * * echo hello >> ~/cron-logs/hourly/test`date "+%d"`.log      Unfortunately I get this message when that runs:               /bin/sh: -c: line 0: unexpected EOF while looking for matching ``'     /bin/sh: -c: line 1: syntax error: unexpected end of file      I have tried escaping the `date` part in various ways, but without much luck. Is it possible to make this happen in-line in a crontab file or do I need to create a shell script to do this?


Mplayer cronjob doesn't work

> **Possible Duplicate:**   >  How can I execute `date` inside of a cron tab job? I made a cronjob to record a stream every friday between 23pm and midnight. Only somehow this doesn't seem to work. the cronjob is               57 22 * * 5 timeout -s SIGINT 66m mplayer -dumpstream http://82.201.100.23:80/slamfm -dumpfile /var/www/HOA-NL/$(date +"%U-%Y").mp3 >> /home/david/HOA-NL-LOG 2>&1      This doesn't work while the following works               57 22 * * 5 echo "foo" > /home/david/barr      and the following works either (timing out echo doesn't make sense, I know. It's just an example)               57 22 * * 5 timeout -s SIGINT 66m echo "foo" > /home/david/barr      Now I'm wondering why this doesn't work.. It doesn't give me a error or a message in /home/david/HOA-NL-LOG


cron logging but not working on some commands

> **Possible Duplicate:**   >  How can I execute `date` inside of a cron tab job? I have a server in Amazon EC2 that I run a backup script on with cron. However, it is not working. To test out if cron is working, I did the following: Logged into the server and switched to root. I then ran "crontab -e". It has the following lines:               SHELL=/bin/bash     PATH=/sbin:/bin:/usr/sbin:/usr/bin     MAILTO=root     HOME=/          29 00 * * thu tar -zcvf /home/<user removed>/Dropbox/Backup/DirBackup_$(date +%Y%m%d).tar.gz /var/www/html/     30 00 * * thu mysqldump -u <removed> -h <removed> -p<removed> --opt <removed> > /home/<user removed>/Dropbox/Backup/database-backup-$(date +%Y%m%d).sql     */1 * * * * touch /tmp/foo      So, the touch command should go every minute, and the others should run at 00:29 and 00:30 on Thursday. Here is what the logs say:               Sep 20 00:27:01 ip-10-204-142-149 CROND[16888]: (root) CMD (touch /tmp/foo)     Sep 20 00:28:01 ip-10-204-142-149 CROND[16890]: (root) CMD (touch /tmp/foo)     Sep 20 00:29:01 ip-10-204-142-149 CROND[16898]: (root) CMD (tar -zcvf /home/<user removed>/Dropbox/Backup/DirBackup_$(date +)     Sep 20 00:29:01 ip-10-204-142-149 CROND[16900]: (root) CMD (touch /tmp/foo)     Sep 20 00:30:01 ip-10-204-142-149 CROND[16913]: (root) CMD (mysqldump -u <removed> -h <removed> -p<removed> --opt <removed> > /home/<user removed>/Dropbox/Backup/database-backup-$(date +)      If I check the time stamps on the /tmp/foo folder, they are changing every minute. If I check Dropbox, the files are not there. (I am using "ls /home//Dropbox/Backup/" to check this to verify that it is not a Dropbox upload problem) They should be! I tested that by copy/pasting the command from cron onto the command line....it works great! Does anybody know why cron would be logging the commands but they are not actually working?


Help with "crontab -e"

I'm trying to learn a little about `cron` and would appreciate some help. I edited `crontab -e` to have this line:                */10 * * * * /usr/bin/touch /home/dkb/Desktop/test.txt      It works and I see `test.txt` changing its "Date Modified" value every ten min in Thunar and there are corresponding entries in `/var/log/syslog`:               Mar 13 10:50:01 dkb-lappy CRON[3978]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/test.txt)     Mar 13 11:00:01 dkb-lappy CRON[4066]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/test.txt)     Mar 13 11:10:01 dkb-lappy CRON[4099]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/test.txt)      But, if I use               */10 * * * * /usr/bin/touch /home/dkb/Desktop/$(date +%H:%M:%S).txt        **no** file is created at all in ~/Desktop and `syslog` has this:               Mar 13 11:30:01 dkb-lappy CRON[4241]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/$(date +)     Mar 13 11:30:01 dkb-lappy CRON[4240]: (CRON) info (No MTA installed, discarding output)     Mar 13 11:40:01 dkb-lappy CRON[4251]: (dkb) CMD (/usr/bin/touch /home/dkb/Desktop/$(date +)     Mar 13 11:40:01 dkb-lappy CRON[4250]: (CRON) info (No MTA installed, discarding output)      I checked that `/usr/bin/touch /home/dkb/Desktop/$(date +%H:%M:%S).txt` works properly in the terminal. So what am I doing wrong?


How to find out why my cron didn't run?

This is the content of root's crontab:               0       23      *       *       0-4     /usr/sbin/rtcwake -time `date --date="+16 hours" +"%s"` -m mem      This is set to fire off that command every Sun-Thu at 11pm. The command is essentially a suspend for the next 16 hours while I'm at work to save power. I've test the command with smaller times (30, 60 seconds) and it works. However, when I wake up in the morning and check my machine, it's still running. Here's what's in the logs:               Jul 24 23:00:01 gallactica CRON[5033]: (root) CMD (/usr/sbin/rtcwake -time `date --date="+16 hours" +")      So does this mean it ran? Why didn't it actually work?


pcregrep newline lookbehind assertion bug?

Attempting to use `pcregrep` to print the first line after a blank line. For example, contents of file               first line          second line      I need `second line` to be printed. Here are a few tests using the same regular expression throughout With Python 2.7               python -c "import re; print re.search(r'(?<=\n\n).*?$',\         open('file').read(), re.MULTILINE).group()"     second line      With GNU grep 2.16               grep -oPz  '(?<=\n\n).*?$' file     second line      With pcregrep version 8.12               pcregrep -Mo  '(?<=\n\n).*?$' file     (no output)      Based on a few tests, `pcregrep` supports lookbehind assertions in general but does not seem to be able to deal with `\n` within lookbehind assertions in particular. `\n` within lookahead assertions presents no problem. Tested on RHEL as well as Ubuntu. Any ideas?


sharing or synchronizing history between Zsh and Bash

I often find myself switching between Bash and Zsh, and using the history search functionality to recover a command. However, since Bash and Zsh have different history files, I often find that the command I'm searching for has been executed in the other shell. Is there any way to share or synchronize history between the two?


Where to get 32-bit Oracle-XE 11g binaries?

Oracle website offers 64-bit RPMs for its 11g versions. Do they offer 32-bit somewhere or does someone else do? Are there Debian binaries available?


Print Column if values is between two other values

I am fairly new to data analysis and I have a problem with filtering some of my values. I have data arranged in a file with four columns like this:                 A   1       10     5     B   10      100    120     C   100     1000   1200      D   1000    10000     E   10000   100000     F   100000  1000000     G   1000000 10000000      What I want to do now is to print only lines where the values in column 4 are in between the values in columns 2 and 3. So something like this:               A 1 10      C 100 1000     D 1000 10000      I tried with grep and awk, e.g. `awk '$4 >= $2 && $4 <= $3 {print $1,2,3}'`. Though the problem is that awk searches only within the same line and not for all lines where it matches this criteria. I guess it's rather simple but I couldn't figure out how to do it.


What is this complex line of code doing?

I am trying to understand this line from a shell script. I know that `$(..)` means run the `..` and insert its output where you find `$()` in a statement. But what is going on between those parenthesis? What is the `\ls` doing and how does that relate to the `\` on the prior lines? Is that a `\\\` split across two lines? Is `\ls` the same as regular `ls`?               APPCLASSPATH=$CLASSPATH:$({ \         \ls -1 "$VOLTDB_VOLTDB"/voltdb-*.jar; \         \ls -1 "$VOLTDB_LIB"/*.jar; \         \ls -1 "$VOLTDB_LIB"/extension/*.jar; \     } 2> /dev/null | paste -sd ':' - )      I'm a comparative linux noob trying to read some complex shell scripts so a little help would be great.


How do I filter a log to only the lines between two times?

I'm working in Unix. I'd like to fetch information from a log in a specified time range for the current date. For example I want the data from a log file of today's date from 00:00 to 09:00. Sample log entry:               13/10/16 14:45:02 <batchspeedchange> <BELLBD.BD77350A.G6987V00> <> FAILED FILE FORMAT VALIDATION - ERROR:-213:rawData cannot contain tokens      How do I get the output from such a log file?


Private vlan concept (rfc 5517)

I'm learing vlan concept and came around private vlan rfc. I think that i understand the reason and implication of isolated domain, but i'm not sure that i understand the community domain. Particularly i don't understand the difference between regular vlan and private vlan (community domain).   I'm not a system administrator, but for correct implementation it is important for me to understand how it used in real network.   Thanks for any input, Ilya. P.S the question is very simalary to this one, but a bit more theoretical although i will be glad to see practical example how to configure isolated vlan on linux.


Are there any audited webbrowsers in OpenBSD?

I'm looking for an audited web browser on OpenBSD. As far as I can tell nothing in Ports is audited, so are there any browsers built-in on OpenBSD?


Are there any keepassx like solutions for OpenBSD?

Are there any password protecting solutions under OpenBSD, that is not from Ports?


With SSH X11 forwarding (`ssh -X`), get `Can't open display` trying to run X applications

I'm able to login to sever using               ssh -X Hostip      but when i run the command xclock it give me this error               Error: Can't open display: localhost:11.0      I check my Display value using               echo $DISPLAY      and the result is               localhost:11.0      And X11 forwarding is set to YES in sshd_config file               X11Forwarding yes     X11DisplayOffset 10     X11UseLocalhost yes      Any advice what I'm missing here?


How to strip a Linux system?

I've been building a Linux distro, and I've stripped the binaries, etc. The system won't use GCC or development tools, as it will be a Chrome kiosk, so it would greatly help if I could strip down the system... I was wondering, is there a way that I can delete all of the unused system files (like binaries, etc.) by watching what files/libraries are used during runtime? Maybe another method is preferred, but is there a way to accomplish something like this?


Where are the logs for the serial port (power save modes, specifically)

I'm running a system with Ubuntu 10.10 (pretty old, I know, but it has to be that one), with all its packages updated to the latest version supported (the distribution is not supported anymore so, to say so, " _I've got the lastest Ubuntu 10.10 available_ ") I have a very strange issue with a USB Modem: After a few hours (I would say 5 or 6) or working properly, it stops working. Silently. I have a program, written in Python that listens and sends commands to said modem using "`pyserial`" (I believe it's `pyserial` version 2.3 for what I read in `/usr/share/pyshared/serial/__init__.py`) Everything works fine for some hours but then the modem stops sending/receving things. It doesn't throw an error, it doesn't say anything is wrong... it just stops working. I have no clue of what may be going on so my only guess at this point is something related to the ACPI or some kind of power saver mode kicking in. I've tried to disable anything that could remotely sound to "power saving" but still fails. Is there any way of knowing what is going on with my USB / serial port in the logs? I've checked `/var/log/pm_powersave.log`, `syslog`, `dmseg` but I don't really know what am I looking for (or where for that matter). Any idea will be appreciated. Thank you in advance.


How can I force LXDE to have a transparent background when connecting with X/X11?

![raspberry-pi-7 1.jpg](http://img823.imageshack.us/img823/2756/raspberrypi71.jpg) Just got my Raspberry Pi in the mail and I've started playing around with it. After getting LXDE up and working working in desktop mode (i.e. monitor and keyboard plugged in) I decided I wanted to connect to it remotely. I know I can use a VNC/RDP client but maybe for now just connecting with `XForwarding` and launching `lxsession` would be fine. To describe my environment, I'm using OS X I had previously installed `XQuartz.app` to replace the native X11 app (because it boasted more features and benefits for using X applications). The first time I connected as `root` via `ssh` to the remote machine and launched `lxsession` it gave me the behavior that I am seeing to have again - I kept my Mac OS X desktop background and it simply overlaid the LDE menu at the bottom of the screen - sort of a transparent desktop: ![Screen shot 2012-07-18 at copy.png](http://img715.imageshack.us/img715/8825/screenshot20120718atcop.png) However now when most of the time when I do these steps again it not have a transparent desktop - it will in fact show the LXDE background: ![Picture copy 3.png](http://img802.imageshack.us/img802/2797/picturecopy3.png) Is there an option I'm missing to be able to be able to achieve the "transparency" or "integrated" version? I looked in the LXDE Desktop Preferences and didn't see an option to disable it: ![Picture 1.png](http://img694.imageshack.us/img694/980/picture1brt.png) I have tried setting the desktop image to a transparent gif file which will remove the picture, but then I didn't see any way to remove the desktop background color - because after I select the transparent file I am just getting a solid color. How can I achieve the "transparency" or "integrated" version of LXDE via X forwarding from OS X?


How do I boot Linux if boot partition was deleted?

At first, Windows 7 was the only OS in the drive. Then I installed MINT. Accidentally, I formated the `sda1` partition (where the windows 7 bootloader was stored) as ext4, being the mount point of `/boot`. So then I couldn't boot Win7 anymore. (By the way, MINT was installed in the sda5 partition) Afterwards, I repaired the Win7 bootloader succesfully, which deleted GRUB(2?) loader, thus being unable to boot Mint. I tried running:               sudo mount /dev/sda5 /mnt     sudo grub-install --root-directory=/mnt/ /dev/sda      Result message is:               grub-probe: error: cannot find a device for /boot (is /dev mounted?).     Installation finished. No error reported.      And after reboot, I get the `grub>` prompt, but no OS options whatsoever. (Keep in mind, there's no partition assigned for `/boot`)


Installing DRBD on Redhat 5

I am trying to install DRBD on Redhat 5. Everything i find is out of date, and all the files are not hosted anymore. From what I understand I need to install the Cent OS repositories to install DRBD on Redhat 5? Can anyone lead me in the right direction with this please? I appreciate it.