0
votes
2answers
4k views

How to run a command with a hidden password

I need to run a curl command that accesses a website that another person has the password to. e.g. curl --basic --user myfriendsname:friendspassword http://www.updateinfo.com I need a way where I ...
2
votes
1answer
158 views

Is there a command which creates a temporary file containing the arguments passed to it?

I can paste the contents of a file into a command using cat and backticks: ls `cat filenames` Is there a way to do the reverse - to turn a string into a (temporary) filename? gcc -o cpuburn `uncat ...
2
votes
1answer
70 views

Create a deb package from difference between two images

I am maintaining an Ubuntu server image as a development environment with several deployments. If my base image changes - install a package, modify conf files, etc - I am manually patching the new ...
2
votes
1answer
273 views

Globbing fails in zsh, but works in bash

I have an alias in bash, that I'm trying to port over to zsh. I thought it may have been the alias itself, but now it seems it's just the globbing. grep -irl --exclude=\*.{log,class,fuegoclass,dat}* ...
3
votes
1answer
2k views

Is it possible for DHCP to assign different IP addresses to the same machine?

I have installed and configured a DHCP server on my CentOS 6.5. It works properly and assign IP addresses to the clients machines on my network, and as I noticed when a client reconnect the DHCP ...
0
votes
0answers
460 views

How to set up two ipsec tunnels between 2 linux machines

conn %default left=128.247.19.210 leftcert=/home/alphaCert.der leftid="C=US, O=Test, CN=alpha.test.org" right=128.247.19.33 # IP address of Host rightid="C=US, O=Test, CN=beta.test.org" keyexchange=...
0
votes
1answer
2k views

how to ignore a MySql error and go on to the next query?

I have created a shell script to connect to a DateBase and INSERT IPs and MACs from dhcpd.log file by connecting to the DB only once: #/!bin/bash dhcpLogFile="/var/log/dhcpd.log" NumberOfLines=$(awk '...
2
votes
2answers
270 views

How to fix the accents in xterm top bar?

I don't have any problem with accent (I'm French) inside xterm. However, like you can see on this screenshot, the top bar of xterm does have some accents issues: However my Debian unstable system ...
0
votes
1answer
2k views

Cannot resolve hostname

I'm using a Debian on a RaspberryPi and the problem that I'm having is that I can't connect to the Internet. Every time I try I see a message that says "cannot resolve hostname". From the terminal, I ...
2
votes
1answer
592 views

how to Connect to Mysql only once?

I have created a shell script to connect to a DB and INSERT IPs and MACs from dhcpd.log file the scripts worked properly: #/!bin/bash #Defining Variables dhcpLogFile="/var/log/dhcpd.log" #Begin Code ...
0
votes
2answers
787 views

Formatting numbers using awk / print

I found this very cool code to get upload/download speed: awk '{ if (l1) { print "↓"($2-l1)/1024"kB/s ","↑"($10-l2)/1024"kB/s" } else { l1=$2; l2=$10; } }' <(grep wlan0 /...
16
votes
4answers
11k views

Use system clipboard in vi-copy mode in tmux

I'm running tmux 1.6 and I'm trying to configure it to use vi-style keybindings as well as use the system clipboard when copying in interactive mode: set-window-option -g mode-keys vi bind-key -t vi-...
2
votes
1answer
3k views

Why am I getting an error: “Failed to open '/dev/st0'” when extracting an archive with bsdtar?

I installed bsdtar from source (from the libarchive website) because I could not find an rpm nor a package in yum. I'm able to see bsdtar's help message. For example: $ bsdtar --help First option ...
9
votes
1answer
3k views

When and why should I use apt-get update?

General question: Could some explain what the command apt-get update does and when I really should use it? Remarks Please give a detailed answer. Not just a copy of the man page, unless your ...
0
votes
1answer
36 views

Change OpenVPN client, can I use the same server configurations using scp?

I want to change my old FC 4 client to new Fedora 19 client, but I need to use all the same files on openvpn and IP address. Can I use SCP command for copy all this configurations? Thanks!
4
votes
2answers
172 views

Is there a workaround for Debian file-completion trashing $_?

I have years of experience on Slackware linux, and have never seen this problem there. Lately I have been administering Debian servers, and this has become an annoyance. I frequently use "$_" in a ...
1
vote
0answers
488 views

Disable kernel logging during initialization

I'm using a Linux image generated with buildroot for an embedded system. I recently disabled some modules from being generated with the image and now some logging messages are being shown during the ...
2
votes
0answers
63 views

Confusing my IP stack

At work, I have an Oracle GRID/RAC cluster of two hosts, including Oracle's SCAN functionality. Picking one host: eth0 is the management port on 169.254.10.25. eth1, eth2, and eth3 comprise bondeth0 (...
1
vote
3answers
129 views

How do I shutdown the system after a particular process exits

I am downloading some software; I can see the pid of the download process with top. Let's say it's 1001. How can I make it so that my computer shuts down after process 1001 exits?
0
votes
0answers
302 views

TAR not excluding directories with date pattern

I've written this small script: #!/bin/bash TODAY=`date --rfc-3339=date` CHECKDATE=`date --date "2 days ago" --rfc-3339=date` FILENAME=$TODAY-package.tar tar cvf $FILENAME --no-recursion --after-...
28
votes
3answers
6k views

If processes inherit the parent's environment, why do we need export?

I read here that the purpose of export in a shell is to make the variable available to sub-processes started from the shell. However, I have also read here and here that "Processes inherit their ...
0
votes
1answer
31 views

Distro Customisation And Middleware Software Inclusion

I have been very recently introduced to UNIX/LINUX and I am overwhelmed by the sheer power. I am a CS Graduate student and for my final year project I want to make an artificially intelligent Linux ...
5
votes
3answers
17k views

Lubuntu display resolution + VirtualBox

Running the most recent Lubuntu 14.04 as a live OS inside virtual box works without any problemes at 1024 x 768 pixels screen resolution. But when I install it, Lubuntu has a low resolution of 620 x ...
13
votes
5answers
7k views

Difference between cat and '>' to zero out a file

Are these two commands any different on how they go about zero-ing out files? Is the latter a shorter way of doing the former? What is happening behind the scenes? Both $ cat /dev/null > file....
8
votes
4answers
167 views

Is there a tool for summarizing what all commands do?

So I understand that there are man pages for getting the documentation when the internet is unavailable, or when you need advanced uses, but what if I'm offline and I don't even know what tool I need ...
1
vote
2answers
5k views

Regular expression find 3 or 4 numbers

So, I have 50+ words and I have to match the numbers in them. These numbers can be 3 or 4 digit numbers. I think I tried every way there is, but nothing seems to work (I need to remember the number as ...
6
votes
1answer
818 views

Kernel panic when passing noatime in bootargs

I have an embedded system using jffs2 and want to pass rootflags=noatime in the kernel bootargs parameter. This results in a kernel panic: jffs2: Error: unrecognized mount option 'noatime' or ...
2
votes
0answers
76 views

How to get rid of `mosh` spamming `last -f /var/log/wtmp`?

Ever since I've started using mosh, I'm getting way too many entries in my /var/log/wtmp file of last(1) on a Linux box. cnst pts/8 172.56.2x.yz via Mon May 19 08:19 still logged in ...
3
votes
1answer
871 views

scp wildcard not working in zsh

I have switched over to zsh, and it is working fine. One strange thing, when I try to scp with a * wildcard, it does not work, and I have to drop into bash. The second command below works fine. Any ...
5
votes
2answers
5k views

How to troubleshoot high load, when there are no obvious processes [duplicate]

I'm running Ubuntu 13.10 on a laptop. Recently, after waking from sleep, I noticed the computer was quite warm, checked top and discovered 1.00 load average. I shutdown Chrome, various daemons, no ...
1
vote
3answers
547 views

Execute script on Linux Mint from a Windows Machine

Basically I am trying to use Linux Mint to display Powerpoint presentations. The presentations will be updated on a Windows machine, the user will then execute a script which 'refreshes' the ...
5
votes
1answer
722 views

BASH_ENV and cron jobs

I have several questions related to non-interactive, non-login shells and cron jobs. Q1. I have read that non-interactive, non-login shells only "load" $BASH_ENV. What does this exactly mean? Does ...
1
vote
1answer
877 views

Unable to extract modulus, exponent from pubkey.pem

I am trying to extract modulus and exponent components from public key which is in .pem file, using below command: openssl rsa -inform der -pubin -text < pubkey.pem But it is showing me below ...
4
votes
1answer
183 views

Why do bash variables disappear when I use xargs?

I have a simple bash script and want to count how often a command gets called. Here is a minimal example, the counter is called c and should be 4 at the end: #!/bin/bash c=0; for a in X Y; do for ...
0
votes
1answer
1k views

i3 status bar: low battery not showing up in red

I have configured this in my i3status.conf: battery 0 { format = "%status %percentage - %remaining" low_threshold = 30 threshold_type = time integer_battery_capacity = true } And the ...
0
votes
1answer
99 views

change column with awk scripting

I am trying to make a script B that uses another script A to change a specific column in a specific line. However, when I run the script A alone it runs perfectly. But when I try to use the script B (...
0
votes
1answer
11 views

Copy a directory containing links and their targets in Linux

I have a directory: /home/username1/dir_1 This directory contains two folders, folder_1 and folder_2. In folder_2 are links to files present in folder_1. Now, I want to copy dir_1 into /home/...
1
vote
1answer
307 views

Meaning of entries in /etc/securetty?

I've been given a set of entries to apply to /etc/securetty, what does each of them mean? console tty1cd / tty2 tty3 tty4 tty5 tty6 ttyS0 ttyS1 I'm especially interested in the "tty1cd /" entry. I ...
1
vote
1answer
321 views

Displaying server information at login prompt (Ubuntu)

I'm wondering if there's a way to customize the Ubuntu server login prompt. Currently it shows the following: Ubuntu 13.10 fw tty1 fw login: _ I know there's /etc/motd for the message of the day, ...
-3
votes
1answer
2k views

yahoo messenger for linux

I want to install the latest version of yahoo messenger in RHEL5 & FEDORA. Is that possible? Where to get it and how do I install it?
7
votes
4answers
3k views

Compare two kernel config files from the menuconfig perspective?

I have a situation in which i have two kernel config files (for the same kernel source ). Both of them have a part of the functionality that i need (on one, USB works correctly, on other, the second ...
2
votes
1answer
147 views

Play last few seconds of mp3

Is there any way to play last N seconds of an mp3 file on bash commandline?
0
votes
1answer
156 views

Replace USB stick boot device with SSD

I have an OpenElec based HTPC which boots from a USB stick. I would like to replace this with an SSD drive. What is the best way of copying the USB image to the SSD. Is this something that dd could do ...
0
votes
1answer
283 views

Manjaro: don't update an application

I've got a few local dev-servers configured on LAMP. Each time Manjaro (based on Arch) updates its software, PHP needs to be reinstalled for threading support. I have no need to update Apache or PHP ...
5
votes
1answer
3k views

Why does setuid not work? [duplicate]

I want to ensure that my program can only be run by user xyz using root privilege. To do this, I set the setuid bit with: chmod u+s program1.sh ls -l program1.sh rwsr-x--- 1 root house 1299 May 15 23:...
3
votes
10answers
5k views

Finding the maximum of the values in a file

I have a file which contains several numbers, as follows. 21 12 33 35 21 12 33 44 52 63 14 12 23 34 11 12 13 53 1 12 43 33 44 How can I find the maximum of these values, which is 63? I wanted to ...
9
votes
5answers
8k views

Dropbox icon is disappeared in Mint 16 Cinnamon

Dropbox icon was between Mint update manager and keyboard icon, but it was disappeared like the image below. Dropbox is still running, how can I make it appear in task tray again without logging ...
3
votes
3answers
15k views

How to launch two threads in bash shell script?

I am trying to copy files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for ...
1
vote
1answer
101 views

Problem in using user defined variable in a script

The following is a simple script, named myscript, that I wrote in order to run a command. dcmpath='$HOME/Data' dcmfile='IM1' dcm2nii $dcmpath/$dcmfile Unfortunately, bash does not recognize the ...
2
votes
1answer
112 views

How can I partition and format my disk to an accuracy of “LBA” by commands?

How can I partition /dev/sdb into /dev/sdb1 and /dev/sdb2, and then format /dev/sdb1 to exFAT ( or FAT32 ) from LBA=1 to 2097152 by commands? ( LBA=0 is reserved for MBR )

15 30 50 per page