15
votes
6answers
50k views

Rename multiples files using Bash scripting

I want to rename multiple files in the same directory using Bash scripting. Names of the files are as follows: file2602201409853.p file0901201437404.p file0901201438761.p file1003201410069.p ...
2
votes
1answer
397 views

Can I make a second mouse/keyboard (virtual) for xdotool to use?

I have a script running a set of xdotool commands. It only uses half of my screen but I cannot use my keyboard or mouse while it is running due to the number of clicks and typing that is executed. Is ...
0
votes
0answers
98 views

Mouse cursor wonky on Mint 16?

Mint 16, having an intermittent problem. sometimes mouse is normal, sometimes it goes into a period of time where it just doesn't move right. you go left, it goes sort of leftish. Sometimes moving ...
7
votes
1answer
75 views

Swap (exchange) two big files in limited environment

Let's say I have two flash memory devices 1GB capacity each. Let's also say each device contains one big file ~ 1GB size. Assuming, I have limited (64MB) RAM and no hard disk drive, what is the ...
2
votes
1answer
939 views

How can I get write access to my usb drives?

I have trouble writing to external drives. They are monuted automatically in Nautilus, but I can not copy anything there ('Paste' and 'create Folder' are just greyed out). Does Anyone have ideas what ...
7
votes
1answer
768 views

Suse 11 vs. Suse 10 difference impacting terminal colors?

I have my dotfiles versioned on github (shameless fork of other people's fine work). At work, I have them on a central linux server (SuSE Enterprise Linux 10). I rsync them from a central management ...
2
votes
1answer
526 views

starting multiple x-sessions with different DE/WMs with startx in Linux Mint

I'm using Linux mint, and I want two windows managers (MATE and xmonad) running on different pipes. I installed xmonad, and when I choose xmonad from the login screen it works perfectly. But, when I ...
0
votes
1answer
41 views

Localized wrapping in vim

I have wrapping turned on in vim, but is it possible to disable it for certain regions in the file I'm editing? To be specific, I'm editing LaTeX files, I would like the contents of some environments ...
0
votes
1answer
380 views

Error: Missing newline before EOF - inserted

In my application I am inserting some files in main file. In that there is common header file to all the code files (*.c). This giving me error: D:\New folder\COM_Port_Cont\COM_Port_Task.h(268) : ...
5
votes
2answers
3k views

What does it mean exactly when a processes “Time” has stopped in top?

I'll be looking into why we're getting critical swap alerts, and I'll find something like: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP COMMAND 14683 user1 30 10 16.0g 772m ...
0
votes
2answers
611 views

Fedora “disk full”, df, du (gui) confirm but gparted shows the partition is big enough

I am running a fedora Virtual machine and after much pain I managed to extend my virtual machines .vdi, from 20gb to 40gb. However it appears my pain is not over. The machine still complains of low ...
1
vote
1answer
53 views

Rotating a file

I have an application which write to a file. Before I run the application, I would like to rotate the file. In others move file.n to file.n+1 file to file.1. I can write a script to do this, but I ...
1
vote
2answers
4k views

cp and mv if the file named already exists

What happens when you give the following commands if the file named done already exists? $ cp to_do done $ mv to_do done
0
votes
1answer
609 views

Generate .asoundrc

Is there any way to generate .asoundrc? I know that by default this file does not exist and system generates one on the go like Xorg does. But is there any way to see how the content will look like?
2
votes
1answer
101 views

Yum: assume yes if install size < 1MB

What the title says: I don't want to use --assume-yes option, but I'm fine with small installs (less than 1MB) to be processed without asking. Is there any way how to achieve that? I'm on Fedora 20.
3
votes
1answer
566 views

Turning off default video output with xrandr when external monitor is connected

I'm new to bash scripting, and I'm trying to configure my video outputs so that my laptop display gets turned off when I connect an external monitor via VGA. That's the script I came up with, pretty ...
1
vote
1answer
350 views

Examine exported binary gpg key

The commands gpg --export and gpg --export-secret-keys can be used to export keys in a binary format. Is there any command available to examine these exported binary key files? I need to see if the ...
4
votes
3answers
738 views

When exiting the last terminal in a tmux session can it switch to another?

When I exit the last terminal in a tmux session it will automatically close tmux and return me to the parent terminal. Is it possible to instead have tmux switch to another, already running, session ...
6
votes
2answers
31k views

check if interface eth0 is up (configured)

I need to check with a script, whether eth0 is configured. If so, the script will do nothing. Otherwise it will start wlan0. (I don't want both eth0 and wlan0 to be up at the same time). What would ...
4
votes
1answer
98 views

How to see screen information at the top of terminal?

I once used a server where using the screen command gave me a colorful header which told me the name of the screen, the total number of screens, the runtime, cpu utilization and maybe some hotkeys to ...
2
votes
1answer
423 views

Best practices for maintaining error logs (system, device driver & application)

I have many Pandaboards with Ubuntu armhf and one PC server networked with Wi-Fi. On each embedded board I have a real-time application running constantly. I don't know how to reasonably maintain the ...
5
votes
2answers
20k views

My Postfix installation is sending out spam; how to stop it?

Since a few days, my web/mailserver (centos 6.4) is sending out spammails by the bunch, and only stopping the postfix service is putting an end to it. SMPT is set up to only accept connections over ...
1
vote
4answers
202 views

My server has been compromised; how do I delete these files that the attacker left behind?

My vps was hacked and hacker created alot of symbol link in directory. I try with FileZilla to delete this directory but not work I try with SSH and use rm but not work too. Please help how to ...
5
votes
4answers
1k views

Bash Scripting : Printing column data in the same row

I have written a bash script to calculate the size of a PostgreSQL database and print the output along with the date when the script was executed in a text file. The script code is as follows: ...
1
vote
1answer
90 views

Paradox about a-z vs A-Z

I wrote a shell script to recognize the type of character printf "Enter a character: " read var case "$var" in [a-z]) echo "You entered a lower case alphabet." ;; [A-Z]) echo ...
2
votes
1answer
3k views

“NFS <server> not responding still trying” error timestamp

Sometime while my putty session is connected to server, it gets this NFS error. Note the server is Solaris 11 based. NFS server <server> not responding still trying NFS server <server> ...
1
vote
1answer
806 views

WDM: autologin after boot

I am using Debian Wheezy with wdm and LXDE. I would like to have my user to be logged into LXDE automatically after computer start. I know this is possible with other display managers, such as gdm. ...
1
vote
1answer
404 views

Installing PCRE 8+ on SLES SP3

I need to install PCRE 8+ on a Suse Enterprise Linux SP3 box. The trouble is that the latest package available in the repo is 7.8. How would I go about attaining 8+? FYI, I need this to install ...
3
votes
2answers
146 views

How to run a command as if it is called from cron

I write a script and set it as a cron job. But due to a difference of environment variables it doesn't work as it should be. In that case I change a little bit with crontab -e and set a cron job time ...
1
vote
2answers
354 views

File not displayed using vi but visible with command ls -l CD*

I can do an ls -l CD* and see the following output. CDTEST userA RW RW R I am logged in as userA. But if I do an ls -l the file does not appear. If I do vi CDTEST it tries to create a new file ...
3
votes
3answers
282 views

Should Unix sub-command names be case sensitive?

Commands like git, hg, and apt-get all have sub-commands (is there a better name?), and they are all case-sensitive: hg log # not hg Log git status # not git Status ...
3
votes
1answer
229 views

Find and Replace Recursive

I want to modify every file in a directory recursively. I want to replace: <?php with <?php /** * * Copyright (C) MyCompany, Ltd. - All Rights Reserved * Unauthorized copying of ...
1
vote
2answers
75 views

if an exploit is affecting MS office does it affect also LibreOffice? [closed]

This question is really annoying me a lot and I want a reasonable, certain, logical... response for it
2
votes
0answers
793 views

Extremely loud crack and mangled sound over S/PDIF using ALSA

Sometimes it seems ALSA on my machine goes completely haywire: Flash audio on Spotify doesn't produce any sound. SMplayer plays audio just fine, or doesn't play at all (I've observed the latter ...
2
votes
1answer
7k views

Resetting password expiry date by number of days instead of specifying date

Is there a way with either commands passwd or chage to force the password to expire 90 days from the time of command execution? I know I can do it by date, such as: chage -E "2014-07-31" userid ...
3
votes
0answers
74 views

Character encoding of .netrc

Does anyone know which character encoding is used in .netrc? As a German user, I sometimes put umlauts in passwords. So my question is, are these treated as latin1 or may I assume that I am doing ...
1
vote
1answer
1k views

Can I configure apache to limit access to a directory only from my ssh connection?

I have a virtual machine running a number of websites. All users have access these via the external IP address of the machine. I am running Debian Stable on this machine. I can access the machine ...
5
votes
2answers
9k views

To grep 20 characters after and before match

I have the problem that I get too much information after the match for grep -RnisI --color=auto "pseudomonas" * I want to get only like 20 characters or 10 words after and before the match. What ...
7
votes
2answers
538 views

Symbol that will show up first in output of `ls`?

I want a folder called DELETED to be first in my output of ls. Is there a symbol I can add to the front that can cause this? I've tried ^ and - and neither works.
1
vote
1answer
460 views

How can I change the screen resolution of Slax?

Slax uses X.org for managing its GUI. However, when I boot Slax (specifically in a VM), the resolution gets capped at 1024x768. How can I increase the resolution to more fully utilize the screen ...
0
votes
0answers
102 views

My computer beeps while copying files

Whenever I create disk activity on my memory stick, my headphones create very annoying beeps at various notes. It doesn't happen with my in built speakers, and it hasn't happened before. I'm on Ubuntu ...
1
vote
1answer
176 views

Show who a file is chowned to?

To make things brief: I can chown a file with chown me:mygroup /tmp/file, but how can I see who a file is already chowned to? Something like chown --show-who mabey... Any clean way to see who is ...
1
vote
1answer
327 views

How to add bootloader to ISO? Or, make ISO bootable?

How do I add a bootloader to a Linux ISO? When I isoinfo -d -i ... I do not see the bootloader on one of the ISO's that I have; but on another ISO there is a bootloader.
1
vote
2answers
6k views

How to extract the WAV tracks from Blu-ray or DVD-Audio discs?

I would like to find a way to rip the WAV tracks (LPCM 2.0, 192kHz, 24-bit) from a Blu-ray Audio or a DVD-Audio disc using Linux. (Once extracted, it should then be a breeze to encode the audio tracks ...
2
votes
1answer
291 views

Second RAM module is not shown in `free` in Manjaro

I have two RAM modules (8 GB each) but there is only one shown in free. I hope that following info will help you to locate the problem and find a solution: $ uname -srvmo Linux 3.10.27-1-MANJARO #1 ...
6
votes
1answer
483 views

Linux and x32-ABI - How to use?

Intro I just moved to a 64bit installation and I'm experiencing big difference in memory usage ( especially for app like chrome, firefox, mysql and java apps ): While before 4gb were enough now ...
1
vote
0answers
261 views

Multiple graphics cards in X

I have a really interesting situation. I'm on a Dell XPS 15z laptop, which features an NVIDIA Optimus display combination, using the integrated i915 Intel Graphics alongside an NVIDIA GeForce GT 525M ...
1
vote
1answer
725 views

How to change locale to English?

I have message from bash and it's localized, I want English message, my locale is: $ locale LANG=pl_PL.UTF-8 LANGUAGE=pl:en LC_CTYPE="pl_PL.UTF-8" LC_NUMERIC=pl_PL.UTF-8 LC_TIME=pl_PL.UTF-8 ...
2
votes
3answers
4k views

Assigning a command to variable

I assign command ls to my variable my_File but when I run it as $my_File it does not work. Can you please explain why? #!/bin/bash my_File='ls -f | grep -v '\/'' $my_File
0
votes
1answer
50 views

echo keywords found

I'm trying to figure out which keywords are being found for [each] file in the script below. I tried adding echo $keywords and it just outputs every keyword. Code: keywords=("Alachua" "ALACHUA" ...

15 30 50 per page