Tag Info

New answers tagged

0

I tried lsof -p <pid of python process>. It includes the line: python 1834 barmar 3u sock 0,6 0t0 70994705 can't identify protocol So while you can't find the process that has a specific port bound this way, you could use lsof | grep "can't identify protocol" to find all processes that have ports bound but not connected or ...


1

I think Gnome is more universal, when KDE is more for desktops. Besides, I think that if we said one day 'we do a FREE DE' we should stick with it. Everyone remembers switching from OpenOffice to LibreOffice. There's been a reason for that. I think that guys from KDE teem do amazing job. But can you imagine both teems starting to collaborate and giving us a ...


1

If you want to hide all output from the commands you're running (both output and errors), but still be able to print messages yourself, then Hauke Laging's approach is absolutely the right way to do this. It lets you keep a reference to stdout (aka file descriptor 1) and stderr (aka file descriptor 2), redirect them to /dev/null, but still use them if you ...


0

You can also sort by octal value. for i in *; do stat --format="%a %n" "$i"; done | sort -n


1

Have a look at libpam-script. It allows you to execute scripts during authorization, password changes and sessions. To meet your need, you can build a PAM configuration (in /etc/pam.d/<whatever>) that arranges for this module to execute right before pam_deny only if the normal sequence of modules denies the login.


6

You can save the file descriptors of stdout and stderr, overwrite them, and restore them after the programs have been run: exec 3>&1 exec 4>&2 exec 1>/dev/null exec 2>/dev/null ./script-1 ./script-2 ... ./script-n exec 1>&3 exec 2>&4 # delete the copies exec 3>&- exec 4>&-


6

Redirect all the output as a block. ( yum -y update service restart nginx yum install atop cat /var/log/somelog.log > /home/cron/php/script ) > /dev/null 2>&1


4

ls does not directly support sorting by permissions, but you can combine it with the sort command: ls -l | sort You can use the -k option to sort to start matching from a specific character, the format is -k FIELD.CHAR, the permissions are the first field in the ls output. So e.g. -k 1.2 will start from the second character of the permission string, which ...


1

No, but there's an open bug asking for this: https://bugzilla.gnome.org/show_bug.cgi?id=730157


0

After the fact, I don't think there's any intrinsic way to find out about past mount and unmount operations. There may be indirect means, for example if the filesystem driver emits a log message. If you want to tell whether a particular directory is a mount point at a given time (I assume that your filesystem is always mounted at the same location), you can ...


1

The only way I am able to reproduce the error: execve("/usr/bin/python", ["python", "--version"], [/* 14 vars */]) = -1 EACCES (Permission denied) ...is by making the ELF dynamic loader non-executable. This works: $ ls -l chroot12/lib64/ld-linux-x86-64.so.2 -rwxr-xr-x 1 root root 149280 Oct 30 16:22 chroot12/lib64/ld-linux-x86-64.so.2 This doesn't: ...


0

I had this issue the first and second time I went through LFS. I was using multiple console windows to build multiple packages at the same time because there are a lot of small packages to build. I started over a third time and decided just to build one package at a time. It took a long time but I got everything to compile correctly and work properly in the ...


0

#!/bin/bash # host we want to "reach" host=google.com # get the ip of that host (works with dns and /etc/hosts. In case we get multiple ipaddresses, we just want one of them host_ip=$(getent ahosts "$host" | head -1 | awk '{print $1}') # only list the interface used to reach a specific host/IP. We only want the part between dev and src (use grep for that) ...


0

Just proposing something without having any way to try it right now... but just guessing from the post itself Here is a proposal of solution: Assuming the topmost process id is in $pid, and that on linux as well ps -T gives out the tree of processes (I can't have access to linux at the moment) for eachpid in $(ps -T "$pid" | awk '{print $1}' | grep -v ...


0

Well, you can do it in a bash, if you want so. if ((mount | grep "/mount/point")>/dev/null) then echo "Is mounted"; fi;


1

There is a fi missing : you have threeif, but your first isn't closed anywhere...


1

Installation will not result in memory or cpu overhead. Installation only will use up disc space. However if you ever find yourself at the display connected to the machine and are forced to use a commandline/text only version of a utility for which task you are more familiar with a graphical tool, you can always startup X and "waste" the cpu/mem for that ...


0

For the server tasks, you don't need X server at all. All services work fine without GUI. For remote connection, you can use ssh. Actually, usage of CLI ususally gives you more facilities to manage server than GUI does.


2

I just wanted to add to this question as I was trying to disable transparent hugepages on CentOS v6 in order to enable TokuDB for MariaDB. I added the script mentioned by @slm to /etc/rc.local and it disabled transparent hugepages. However, because of the way startup scripts work in Linux, /etc/rc.local is executed after all the services are started. ...


0

The snapshot provided here depends on the type(version) of kernel too. Older kernels with version 2.4 had poor affinity which caused lot of ping pong movement of threads impacting the performance of the system. Kernel versions from 2.5 have relatively better affinity. On a multi-core based system, setting of affinity can improve performance, by avoiding the ...


1

As dfarrell07 pointed out, taskset does not affect all threads (LWPs) of a process by default. Use the "-a" option to taskset to affect all threads in the process.


1

Had same problem after changing from dynamic to static IP. My Network configured now: STATIC - NO IPv6 and not intending of using a mailserver. I resolved the problem by doing: 1: run dpkg-reconfigure exim4-config 2: When you get to the DNS lookups question -> Set the DNS lookups to minimum (Dial up) It gave me an error that this kind of lookups wasn't ...


1

You can use a programming language to open a socket and roll-your-own library, using the modbus spec. Otherwise you can use an existing library, I have no experience with any of them, but this looked promising: http://libmodbus.org/documentation/


1

If the file is created for enough short amount of time, you can run the following command on separate terminal before running the script: while true; do cat /tmp/drush_* 2>/dev/null && break; done Where /tmp/drush_* is your pattern. The advantage is that it's quick and you don't have to install any external tools (if you don't have e.g. ...


0

Just in case, because this happened to me. Get sure you have sshd running in the host! It's a stupid failure, but might be really be your problem.


2

Did you add the samba password for the users on the server? For each user account you would want to be able to access the samba share, do this on the server: smbpasswd -a username It will then ask for a samba password. I usually make this the same as the user's system account password.


2

drush is likely using that temp file in one of two ways: It's creating the file; using it; and then leaving it around. It's creating the file; using it; and then cleaning it up. My guess is that you wouldn't be asking the question in case (1) because you could just inspect the file manually after the fact. So then the problem is that you want to inspect ...


2

You could set up a script that uses inotify (inotify-tools on Debian) and have it scan any changes of files in a particular directory. Then filter out the filename and cat it to a log file.


0

Upgrading cmake to version 2.8 fixed everything.


0

I was able to solve the issue with a reboot of the Virutal Machine. After reboot, I was able to run pvcreate /dev/sdb successfully. Any idea what happened after a reboot. I'd like to know more on why a reboot resolved the issue.


2

Tar files don't have directory (like e.g. a zip file) Thus doing tar tf is the only thing you can do. If you have to run this multiple times then of course you can list the contents of each tar file in a file and search through that: tar tvf oneofthe.tar > oneofthe.tar.lst I would even do so if there is only a slight chance of having to rerun the ...


-1

Change the configuration file /etc/sysconfig/network-scripts/ifcfg-eth0 like this example and it will works: DEVICE=”p1p1″ BOOTPROTO=”static” IPADDR=”192.168.1.22″ NETMASK=”255.255.255.0″ GATEWAY=”192.168.1.1″ HWADDR=”00:12:34:56:78:90″ DNS1=”192.168.1.1″ DNS2=”4.2.2.2″ NM_CONTROLLED=”no” ONBOOT=”yes” TYPE=”Ethernet” ...


5

Linux normally doesn't do any locking (contrary to windows). This has many advantages, but if you must lock a file, you have several options. I suggest flock: apply or remove an advisory lock on an open file. This utility manages flock(2) locks from within shell scripts or from the command line. For a single command (or entire script), you can use ...


0

The Scope for getting distro name is not in kernel development scope. So no specific method is present currently. I am asking for module param in my driver for this. you can also ask for a ENV variable while compiling. Thanks, for your help...


4

In the beginning, if you had something to contribute (a patch or a bug report), you mailed it to Linus. This evolved into mailing it to the list (which was linux-kernel@vger.rutgers.edu before kernel.org was created). There was no version control. From time to time, Linus put a tarball on the FTP server. This was the equivalent of a "tag". The available ...


1

WMI on Windows will ask the installed video card driver to get the video card name instead of linux (lspci) will get their informations directly from the chips. So you can´t get the video card name in plain text from linux without install the correct video card driver.


1

It appears that there are additional undocumented flags in the RWBS field and that the 'B' for barrier is deprecated. N probably means notify although as jlliagre says it is denotes anything that is not discard, read or write. D - discard W - write R - read N - None of the above F - FUA A - readahead S - sync M - metadata static inline void ...


2

I have several jobs that require running at least once a day. What I do is start the scripts for these jobs every hour (or more often) and the scripts themselve check if they have already run by checking a status file on disc. If the status file exists and is up-to-date then the script exits. If that file is to old (i.e. last written the day before) or ...


2

If you are need to make changes to both you can use loop #!/bin/sh for id in $(xinput --list | \ sed -n '/Corsair Corsair M65 Gaming Mouse.*pointer/s/.*=\([0-9]\+\).*/\1/p') do xinput --set-prop $id "Device Accel Profile" 6 ... whatever you want to do ... done


0

If you need to free a specific disk - you can use pvmove /dev/sdb It will spread the data among all other disk of the vg. There are lots of cammands under the lvm tool. If you specify your goal the answer will be more helpful


0

A named pipe(fifo) can do what you want up to a point, but with a couple of caveats: If you want to be able to write to the pipe before the reader exists, your writer must open the fifo as read-write or the call to open will block. In the shell this might look like this: exec 3<>/path/to/pipe echo "foo" >&3 cat <&3 As you can see ...


-1

Do you mean http://en.wikipedia.org/wiki/Named_pipe ? It works as you asking for.


1

command is pretty straightforward pvmove /dev/sdb /dev/sdc where /dev/sdb is source /dev/sdc is destination those volume need to be in vg. This command will remove from sdb all logical volume (provided there is room in /dev/sdc) you can latre issue a vgreduce vg01 /dev/sdb to remove sdb from vg01.


0

1) Edubuntu,It is a part of Ubuntu Project. 2) Qimo, It is also based on Ubuntu. 3) Ubermix, It's almost same as Ubuntu but It has applications which are for kids. For Kid-Safety applications, There Is 'Parental Control' which is help you control your web-browser. There are a lot of time time organizer applications for to get control how much time PC ...


0

I'm not going to get into setting up a VPN server, but I will go over the absolute minimum that you should know about VPN use with public WiFi. A VPN connection (for your purposes) is simply a protected connection between your computer and another computer/server. When you connect to the Internet via public WiFi, you should be most concerned with your data ...


0

GRUB: GRUB stands for Grand Unified Bootloader LILO has no interactive command interface, whereas GRUB does. LILO does not support booting from a network, whereas GRUB does GRUB has the knowledge of the filesystem (the older Linux loader LILO didn't understand filesystem).


1

The biggest deficiency that LILO had was it didn't know anything about filesystems. It stored a static list of where the disk blocks holding the kernel were on disk. Same with the initial ramdisk image. The upshot of this is that that if you rebuilt your kernel or initial ramdisk, you had to remember to re-run the lilo command even if the files kept the ...


0

I have had the privilege to hear RMS (Richard M. Stallman) and Linus Torvalds. In RMS's own words, Linus made the kernel and from the e-mail that is now well-known on the comp.unix.os newsgroup http://www.linux.com/news/software/linux-kernel/734956-linuss-famous-email was to make it a toy project. The similarities between the kernel project and the GNU ...


-1

You can simply use Alt+F1 to return to your desktop.


1

There are several ways to tune I/O performance. file system choice - choose a file system depending on what your typical data looks like - some file systems handle better lots of smaller files, some do well for large files, some don't scale well when accessing (especially creating) multiple files at once. Defragmenting might help on spinning plate drives ...



Top 50 recent answers are included