Tag Info

Hot answers tagged

11

The init process is always assigned PID 1. The /proc filesystem provides a way to obtain the path to an executable given a PID. In other words: nathan@nathan-desktop:~$ sudo stat /proc/1/exe File: '/proc/1/exe' -> '/sbin/upstart' As you can see, the init process on my Ubuntu 14.10 box is Upstart. Ubuntu 15.04 uses systemd, so running that command ...


8

On RPM-based systems, you can query the RPM database to see what package provides /sbin/init. For example: fedora:~$ rpm -qf /sbin/init systemd-216-24.fc21.x86_64 centos:~$ rpm -qf /sbin/init upstart-0.6.5-12.el6_4.1.x86_64 opensuse:~$ rpm -qf /sbin/init systemd-sysvinit-44-10.1.1.i586 If you just want the package name, and not version, you could add ...


6

[ and ] have a special meaning in bash and also in regular expressions, so you have to escape them as \[ and \]. Something like this should work: rename 's/\[800p\]-\[WOLU-H\]/\[WOLU-H\]/' \[800p\]-* Example: $ touch [800p]-[WOLU-H]-test1.mkv [800p]-[WOLU-H]-test2.mkv $ ls [800p]-[WOLU-H]-test1.mkv [800p]-[WOLU-H]-test2.mkv $ rename ...


5

You've got this code: for file in *.mkv *avi *mp4 *flv *ogg *mov; do target="${file%.*}.mkv" ffmpeg -i "$file" "$target" && rm -rf "$file" done which runs in the current directory. To turn it into a recursive process you have a couple of choices. The easiest (IMO) is to use find as you suggested. The syntax for find is very "un-UNIX-like" ...


4

You can poke around the system to find indicators. One way is to check for the existence of three directories: /usr/lib/systemd tells you you're on a systemd based system. /usr/share/upstart is a pretty good indicator that you're on an Upstart-based system. /etc/init.d tells you the box has SysV init in its history The thing is, these are heuristics that ...


4

apt install ddate should allow your essential research to proceed. In general, you can find packages with commands like apt search ddate, or various graphical package management frontents. You can also use the web site http://packages.debian.org/ to search (remembering that Jessie is currently "testing").


4

This is actually quite a difficult problem. One of the major difficulties is that the places where one most often wants to do this are the places where it's quite likely that one will be in the middle of installing or changing stuff. Another is that there's a subtle but very important difference between the system management toolset that is installed, the ...


3

Example snippet without piping (assumes you are giving the path as argument): #!/bin/bash backup_dir=/backup/ OIFS="$IFS" IFS=$'\n' files="$(find "$1" -type f -name '*.mkv' -or -name '*.avi' -or -name '*.mp4' -or -name '*.ogg' -or -name '*.mov' -or -name '*.flv')" for f in $files; do # get path d="${f%/*}" # get filename b="$(basename ...


3

With POSIX find: find . \( -name '*.mkv' -o -name '*avi' -o -name '*mp4' -o -name '*flv' -o \ -name '*ogg' -o -name '*mov' \) -exec sh -c ' for file do target="${file%.*}.mkv" echo ffmpeg -i "$file" "$target" done' sh {} + Replace echo with whatever command you want to use. If you have GNU find or BSD find, you can use -regex: find ...


3

If your application is not interactive, you might launch a virtual X11 server and set the DISPLAY variable for your application to use it. Possible X11 servers that can be used that way are: Xvfb Xdummy Xvnc The latter allows you to connect later to see and interact with the screen with a VNC client (vncviewer). If you Raspberry pi (or similar) is ...


2

Leaving server_prompts as-is gives you the default (RFC compliant) behaviour, otherwise you might need to modify your clients to supply additional values. The password is looked up in the CONFDIR/passwd file, CONFDIR is equal to /etc/exim4 on Debian. Is your intention that all users use a common password? Then you could change the server_condition. ...


2

You could have a look in /etc/security/limits.conf. You will be able to limit resources by user or group (ie: max number of opened files, memory limit and so on...). User will be able to see his "limits" by running ulimit -a. If you specify a soft limit for him, he will be able to change it using this same command. You can also change the nice priority of ...


2

I expect library symbols will be different, even if you've got what appear to be the same versions in-place. As a half-measure, look for statically-built binaries; then you only have to worry about getting a myriad file locations all correct so the app stops complaining. In many, many cases, if not all, it's simpler to rebuild the app for the environment ...


1

If these are external modules, try building against the kernel first, then install using modules_install as described below. Make sure you are building in the path to your kernel source. From https://www.kernel.org/doc/Documentation/kbuild/modules.txt --- 2.1 Command Syntax The command to build an external module is: $ make -C ...


1

Files in debian/copyright lists files in the source package, before installation. So in your case if I've understood correctly that's option (a), share/includes/idna_convert.class.php.


1

Linux Mint comes in two flavors. Ubuntu based Debian based (LMDE) The Ubuntu based version (the default one) is guaranteed to work with Ubuntu packages and the LMDE is guaranteed to be compatible with packages from the Debian repository. Even though most debs of Debian works in Ubuntu it still some non-compatible packages due to File system hierarchy ...


1

For some reason you've ended up with i386 cups-daemon installed, instead of amd64. That's why it ends up needing i386 PAM modules... To fix this, you need to remove cups-daemon and re-install the amd64 version; as root: apt-get remove cups-daemon:i386 apt-get install cups-daemon:amd64 If your dpkg architectures are set up correctly you should be able to ...


1

xdg-desktop-icon adds an icon to the current user's desktop, it doesn't add entries to all users' menus. desktop-file-install installs .desktop files to the user's applications directory when run as a non-root user, and to /usr/share/applications if run as root (thanks for pointing that out), so you can use that to install an application entry in the menu. ...


1

Welcome to Unix :) To answer some of your minor questions that answers to the main question didn't cover: Shell scripting certainly has some rough edges, since a lot of things break on file names with spaces. And almost everything breaks on filenames with newlines (fortunately, nobody makes those on purpose). Filenames containing glob characters like [, ...


1

This is a known bug. See Debian bug report 782505. Briefly, this is a security fix gone wrong. Less briefly, the package libxrender1 for the archs i386 and amd64 have different contents for the shared changelog file /usr/share/doc/libxrender1/changelog.Debian.gz. This is of course not allowed by dpkg. ...


1

You could also try: sudo pvscan This will show you if any of the disks are in use by the logical volume manager. You can also use fdisk to determine which device corresponds to each physical drive: sudo fdisk -l /dev/sda sudo fdisk -l /dev/sdb sudo fdisk -l /dev/sbc sudo fdisk -l /dev/sdd


1

lsblk will show you the mountpoint of your disks.


1

Use one of Debian's standard configuration packages such as exim4 or postfix. (I think the default is now postfix but it certainly used to be exim4.) During installation you'll be asked for the scenario you require, and one of the options will either match you requirements or get very close: "Locally generated mail to local users is forwarded to some ...


1

After hours searching, there seems to be different causes for this issue and different solutions for each one. I'm not an expert to provide a comprehensive answer so I hint to some frequent situations on the topic: Ownership/permission issues for mounted devices on mount points: File permissions won't change USB drive auto-mounted by user but gets write ...


1

systemd is not backwards compatible with System 5 init, only System 5 rc. You've switched from Debian 7 to the prospective Debian 8. This has, probably unbeknownst to you, switched your system management from (Linux) System 5 init+rc to systemd. systemd is the default init system, and that particular upgrade performs this switch. Linux System 5-style ...


1

Have you tried using strace to diagnose the problem? I have a similar problem which seems to be related to the google-earth package -- something in the meta-data for the package causes apt-get (or some component of the apt system) to segfault. I discovered this by using: sudo strace -f apt-get update >log.strace-aptget 2>&1 Looking at the log ...



Only top voted, non community-wiki answers of a minimum length are eligible