0
votes
2answers
19k views

CPU usage monitoring in AIX servers

In order to monitor the CPU usage in an AIX server I'm using the following script that is executed every 10 mins. lparstat 2 10 > cpu usage=$(tail -10 cpu | awk 'BEGIN {sum=0;} {sum+=$4} END{print ...
4
votes
3answers
352 views

Why do people call Linux a kernel rather than an OS?

Why do people refer to Linux as a kernel rather than an operating system? To the best of my knowledge, the kernel is one part of the operating system.
3
votes
1answer
3k views

Understanding /var/log/messages entries

192.168.25.1 = router 192.168.10.1 = gateway/modem 192.168.25.144 = this pc (which is 'linuxpc' running fedora 17) What happened during these log entry events below? Specifically what do the last ...
1
vote
1answer
184 views

Kernel pppd task hung after running over serial port

I am trying to run the ppp daemon on the console port of my board which has p2020 processor with Linux kernel 2.6.32. After running ppp interface ppp0 is not coming up and I get an error pppd blocked ...
1
vote
1answer
3k views

using find in Bash Script and checking if file is present

var= "$(find . -name 'gen*.bt2')" if [ "$var" == "" ] then echo bad else echo great fi I get errors ./script.sh: line 4: ./gen.4.bt2 ./gen.rev.1.bt2 ...
3
votes
1answer
2k views

Wrong output of du?

I think my du command is confused. % du -shc DIR ... ... 6123941496 total % du -shc DIR ... ... 6.1G total % du -sc --si DIR ... ... 6.6G total I've tried giving LANG=C and ...
2
votes
1answer
188 views

Is there a mechanism to run a “service” by a non-root user? [duplicate]

Is there a way I can have a continuously running, background process that can be controlled by me (a regular, non-root user)? All I need to be able to do is start, stop and restart the process. ...
1
vote
1answer
331 views

Script that spawns terminal windows suddenly waiting for each window to close before opening the next one

I recently started using a bash script to setup terminal workspaces for myself, and everything worked fine for the first couple of days. I run the script, and four or five or seven terminals pop up, ...
1
vote
1answer
223 views

How to safely move a file to another directory and remove duplicates

I want to move files from Downloads, Documents, Pictures, Music, et al to shared locations. This is for various reasons, including because I want to keep media in a central, shared place. I want to ...
2
votes
1answer
196 views

Any better method than this for sorting files by their creation date?

I needed to display a list of directories sorted by their creation date and I came up with this code snippet that I thought was kind of clever. Is there a more obvious way to do this that I'm missing? ...
4
votes
1answer
455 views

Tell Conky to update from a separate process

I have Conky display my current volume with ${exec bash /path/to/script/getvolume.sh}. However I have noticed that after changing the volume, I have to wait a while for Conky to update. Is it possible ...
48
votes
3answers
24k views

Find out current working directory of a running process?

What command(s) can one use to find out the current working directory (CWD) of a running process? These would be commands you could use externally from the process.
0
votes
2answers
125 views

Run level script - Help

I want the following command to be ran, as soon as system boots. glances -s -P redhat & How to achieve that? I tried writing a run level script which didn't work as expected.
0
votes
1answer
95 views

Can i use & variable of sed for doing operation inside $()? [duplicate]

I am not sure whether the below statement can be done placing & inside $() so that each time & is replaced by 1,2,3,4 and 1 is added to it. echo 1 2 3 4 | tr ' ' '\n' | sed "s/.*/$(echo expr ...
2
votes
2answers
4k views

RHEL5 to RHEL6 Upgrade

I'm trying to upgrade our RHEL 5.9 servers to RHEL 6.4. We have lots of third party software and mounted systems so it would be nice if we could upgrade without re-installing. I know RedHat doesn't ...
1
vote
1answer
1k views

service vs. initctl in Ubuntu

Why are some deamons run out of service and some out of initctl in Ubuntu? Do both tools do the same thing and it is just a matter of personal preference of the user what they will use? E.g. sudo ...
0
votes
2answers
10k views

What does the commands sudo, apt-get, install, and fakeroot stand for? [closed]

I am a newbie to Linux and I am trying to build a custom kernel on ubuntu and I saw this document and it said I needed to install the packages https://help.ubuntu.com/community/Kernel/Compile To ...
2
votes
1answer
192 views

xmodmap hanging the system for 20 secs and not sticking

I edited the keyboard map using xmodmap as per https://wiki.archlinux.org/index.php/Xmodmap, and I have two problems: executing xmodmap ~/.Xmodmap completely hangs the system for 15-25secs, which ...
0
votes
3answers
2k views

Script to login to ssh twice

I need to login through ssh twice with a script and can't get it to work. This is what I have in my script file: #!/usr/bin/expect set login "user" set addr "address1" set addr2 "address2" set pw ...
2
votes
2answers
5k views

What's the idea behind rm not removing non-writable file by default?

What's the idea behind rm not removing non-writable file by default? Every time you want to remove a file that is non-writable file for current user but you have a write permission on directory get ...
17
votes
3answers
15k views

How can I delete a word backward at the command line (bash and zsh)?

How can I delete a word backward at the command line? I'm truly used to some editors deleting the last 'word' using ctrl+backspace, and I'd like that functionality at the command line too. I am ...
2
votes
2answers
1k views

How can I purge old kernel packages in Elementary OS?

On my Elementary OS system, dpkg reports a number of kernel packages that aren't installed. (I did an apt-get purge on them previously.) I'd like to have them forgotten about entirely, but I can't ...
10
votes
2answers
4k views

Is it possible for a daemon (i.e. background) process to look for key-presses from a USB keyboard?

I'm working on an embedded Linux project where I will be developing a program that will run automatically on bootup and interact with the user via a character display and some sort of button array. ...
3
votes
1answer
1k views

Efficient way to print lines from a massive file using awk, sed, or something else? [duplicate]

If I had a plain-text file containing 8 million lines and I want to print out lines 4,000,010 to 4,000,000 to the screen, which would be more efficient: awk or sed? There is no pattern to the text, ...
1
vote
1answer
281 views

ALSAMIXER - deleted the alsa* from /bin - need to recover

I am an Archlinux user and I ve had problems with alsamixer which didn't play sound in google-chrome. So I 1st tried to uninstall it using: sudo pacman -Rns alsa-plugins alsa-tools alsa-oss After ...
5
votes
2answers
3k views

fuser vs lsof to check files in use

I've been getting some suggestions on how to figure out why my serial port is busy. Specifically, when I try to start gammu-smsd, it refuses to start on /dev/ttyS0 because it says that port is busy: ...
1
vote
2answers
184 views

Linux: snooping on existing process's output

Say there's a running process that produces output, but you don't know where that output is redirected (it might go to a file, an open terminal, or /dev/null for all I know). Is it possible to snoop ...
1
vote
1answer
368 views

Executing a command after eth0 is available, but before DHCP client

I'm running Debian Weezy on an ARM board. Right now I'm working around an issue with my network driver by running an ethtool command that limits the Ethernet interface to 100 megabit. However, the ...
2
votes
3answers
367 views

zip a directory that name start with `-` [duplicate]

How can I zip a directory like -foo? $ zip "-foo" "-foo" shows only help page. I think -foo is recognized as a options, but I don't know how to solve it.
1
vote
4answers
414 views

How do I store long hostnames list for SSH quick usage?

I have an SSH access to a lot of servers. And all that hostnames (and sometimes usernames) are long and hard to remember. Also even if I tweak my Terminal to keep eternal bash history, the using of ...
19
votes
3answers
27k views

dircolors: modify color settings globaly

I understand ls uses dircolors to display colored output. dircolors has default database of colors associated with file extensions, which can be printed wiht the command dircolors --print-database ...
2
votes
1answer
1k views

ksh:Get files created on specific date in directory [duplicate]

I want get the files that were created on specific date in a directory > ll total 36 -rw-rw-r-- 1 tak tak 212 Oct 08 07:06 name.log -rw-rw-r-- 1 tak tak 494 ...
23
votes
3answers
956 views

shellcheck is advising not to use basename: why?

I am trying out shellcheck. I have something like that basename "${OPENSSL}" and I get the following suggestion Use parameter expansion instead, such as ${var##*/}. From the practical point of ...
3
votes
1answer
670 views

How can I set check interval for set autoread option in VIM

How can I set check interval for set autoread option in VIM? Is it possible?
1
vote
2answers
155 views

AWK special character

If i want to awk the below pattern in a file Mobilenumber '91_987986787688899' was successful I used the below code awk '/Mobilenumber '91_987986787688899' was successful/ {print $0}' Log Filename ...
5
votes
2answers
810 views

How do I run a script when I switch between keyboard layouts

I use more than one keyboard layout, and I would like to find a way to run a script when I switch between them. Is this possible? So far, I can assign a shortcut for a script like this: #!/bin/bash ...
0
votes
1answer
298 views

linux + cant run dialog utility + got errors

Problem is as follows: Linux kernel: 3.0.13-0.27-default #1 SMP I’ve installed “dialog” utility ( /usr/bin/dialog ) just copied bin file to /usr/bin When I have tried to run it, error message ...
3
votes
1answer
4k views

Can't start mysql on Fedora 19

I'm running Fedora 19 and I have installed MySQL using yum install mysql. When I issue the mysql command, I get the following error message: ERROR 2002 (HY000): Can't connect to local MySQL ...
0
votes
2answers
222 views

linux + cant run dialog utility + got errors

Problem is as follows: Linux kernel: 3.0.13-0.27-default #1 SMP I’ve installed “dialog” utility ( /usr/bin/dialog ), just copied bin file to /usr/bin When I have tried to run it, error message ...
0
votes
1answer
248 views

Accessing Pendrive in Ubuntu using Wine

We use ubuntu in our college and they have blocked pendrive access. When we insert pendrive it displays a dialog that says "There is no application to handle this file" (or something like that). So, ...
1
vote
2answers
499 views

Subprocesses of bash/gnome-terminal don't terminate (CentOS/RHEL)

today I observed something which probably has an easy explanation, but was quite quite unexpected from my side: I'm running CentOS (and RHEL which behaves same). I open a bash in a terminal and start ...
4
votes
4answers
5k views

vfat not recognized in debian

I want to mount my usb drive (kindle vfat32). When I do mount -t auto /dev/sdf1 /mnt/usb I get mount: unknown filesystem type 'vfat' I checked if the drive is recognized with sudo fdisk -l and ...
1
vote
2answers
2k views

error: “net.inet.ip.fastforwarding” is an unknown key

I've been doing some research into improving performance for OpenVPN and I found out about setting fastforwarding to 1 but when I tried I got the error error: "net.inet.ip.fastforwarding" is an ...
1
vote
2answers
2k views

installing/configuring and running sshguard on debian

I am trying to install/configure and run sshguard on debian, I want to check if brute force attacks happen on my server. I have installed it via apt-get, then I installed systemd and followed the ...
3
votes
1answer
3k views

USB 3.0 Device not enumerated on USB 3.0 Port in Debian 6.0 OS

I have installed Debian 6.0 OS (Linux kernel 2.6.32 )to test my USB Application as well as Driver. My USB device is working fine on USB 2.0 Port without any issue. But when i tried to connect the ...
1
vote
3answers
627 views

Can't ssh to a machine

All of a sudden, I couldn't ssh to a machine to which I used to ssh earlier. Consider I am ssh-ing from A to B. Output when I run ssh root@ip_addr_of_B I get: Permission denied ...
1
vote
2answers
1k views

Which programme calls csh.cshrc?

I understand that when a user logs into unix remotely, first a getty process is started. If authentication is successful, then etc/environement is called. However, I do not understand when is ...
0
votes
1answer
11k views

How to install squashfs-tools on Ubuntu?

I tried running `unsquashfs and got: $ unsquashfs filesystem.squashfs The program 'unsquashfs' is currently not installed, You can install it by typing: So I went to install it: $ sudo apt-get ...
0
votes
0answers
18 views

UBUNTU + extract filesystem.squashfs for editing [duplicate]

please advice how to install the squashfs-tools on UBUNTU linux ? I try this unsquashfs filesystem.squashfs The program 'unsquashfs' is currently not installed, You can install it by typing: ...
1
vote
1answer
135 views

How can I autocomplete each parameter in a different way?

I have a function called load_pg, which is defined like this: load_pg () { pg_restore --verbose --clean --no-acl --no-owner -h localhost -U $1 -d $2 $3 } And I'm trying to autocomplete each ...

15 30 50 per page