0
votes
0answers
4 views

Mkdir add number iteration

Lets say I have folder1 and I wanted to automatically make a folder2. Now lets say I ran this again and I wanted it to now make folder3, folder 4, and so on for each time I ran this. What would be the ...
1
vote
0answers
4 views

What are the alternatives to the FHS?

Please don't crucify me for asking this question. :) I'm a long time Linux user for over 15 years but one thing I hate with a passion is the mandated directory structure. I don't like that /usr/bin ...
0
votes
0answers
5 views

Number of CPU cores versus frequency of cores in Qemu/Openbox

I plan to build a workstation mainly for running virtual machines. There will be dozens of virtual machines and they do not execute computationally expensive tasks. I will use mainly Qemu as an ...
0
votes
0answers
17 views

Linux: root filesystem via network (with authentication)

I try to create a linux computer which loads its root filesystem from the network. This currently works with NFS, but unfortunately it is not very secure. The network is just a home network, which ...
0
votes
0answers
5 views

shuttle xs35v2 - can't boot from usb drive

I'am trying to install lubuntu on a new shuttle barebone xs35v2. I have tryed with various usb-sticks and diffrent versions, e.g: lubuntu-net installer, lubuntu 62 and 32, and standart ubuntu-version! ...
1
vote
2answers
26 views

With awk, how to Insert a number only for lines starting with “Toto” when they are between a specific couple of patterns

With awk, I would like to insert a numbering like Record n°i# in front of each line starting with Toto only when they are located in-between two specific patterns start=ABCD and stop=EFGH. Input file ...
2
votes
1answer
8 views

How to replace a device in BTRFS RAID-1 filesystem?

I have a BTRFS RAID-1 filesystem with 2 legs. One disk needs to be replaced because of re-occuring read errors. Thus, the plan is: add a 3rd leg -> result should be: 3 way mirror remove the faulty ...
1
vote
1answer
21 views

How to know before compilation which dependencies a package will need?

I want to install a package on Ubuntu 14.04 using ./configure; make; sudo make install, however, it is failing due to several missing libraries. How can I produce a list of needed packages and ...
0
votes
1answer
16 views

How to assign two iface to different subnets?

I have a ethernet connection eth0 and a wifi usb connection wlan0 on my raspbian box which both connect to a router with internet. In my etc/network/interfaces file I have a setup that allows me to ...
0
votes
1answer
11 views

working of pthread_join(tid,&retval);

Why main function calling pthread_join(tid,&retval) does not wait for thread with thread id equal to tid to close? Details - I am trying to create simple file copying program with multi-threading ...
0
votes
2answers
14 views

Are there any drawbacks/caveats to changing process priority on linux?

I'm writing a program launcher that uses nice to launch X applications with a higher than usual priority and while there's plenty of guides to using nice/renice there's not much discussion about best ...
2
votes
2answers
45 views

Is it possible to transfer file from a Linux bash script to Windows without mounting the server folder?

I am writing a script (bash) to transfer files from my local linux machine to Windows servers. The Windows servers are accessible normally using the SAMBA shares and I am able to mount a folder to my ...
-1
votes
0answers
14 views

Unable to replace apache2 conf using sed command [on hold]

sed '//,// s/AllowOverride None/AllowOverride all/' /etc/apache2/sites-available/default Output: sed: -e expression #1, char 38: expected newer version of sed
0
votes
0answers
18 views

Vi-mode shell with Tmux

I want to try using vi-mode shell with Tmux. The reason i want this is to be able to use modal-mode key binding (some g combination or leader key) as Tmux prefix, thus potentially simplifying ...
-1
votes
0answers
11 views

MultiBoot Linux Distros LVM LUKS, How to?

The scope: Have three linux distros(1 BSD) on a cryptodisk with a LVM instead in one computer, so must have a grub2 boot. Did tests and tests but without a success. Following this tutorial ...
0
votes
3answers
34 views

How do I check if a given parameter is in an given array?

I have a shell script script.sh like this: names=( jack john jerry) And I want the user to type any of these three names as its first parameter, just like: ./script.sh jack If the user typed a ...
0
votes
0answers
11 views

fs_usage: a part of stdout is missing.. Where did it go?

I'm using $ fs_usage -f diskio to spy on processus when I hear my hard drive spinning for no reason, so that I know who is working so hard.. Here is one sample line: 16:14:13.785568 ...
0
votes
0answers
18 views

How to force Debian to use a newer version of OpenSSL?

Today I installed ,,empty'' (just minimal set of packages) Debian 8.1 on my VirtualBox. I wanted to play with compiling apps from sources. I started with OpenSSL: compiled from sources OpenSSL ...
0
votes
3answers
49 views

What if I don't want to do anything in a if-then block but something in its else block?

#intro if [ -n "$1" ] then echo 666 else echo 555 fi exit; Actually I do want to echo 555 while I don't want to do anything in the first block, what should I do? I noticed ...
0
votes
2answers
35 views

how to echo $, & symbols correctly?

It'd be a very stupid question but I failed with some existed answers. what I need is very simple: out put &a on the screen while there is already a defined variable a. Here is what happened in ...
0
votes
0answers
30 views

I can't ping the gateway

The network error is that I can't ping the gateway after ip forwarding configuration. Here's the my configuration: linux microcore(server)(First PC) sudo su ifconfig eth0 192.168.2.200 netmask ...
0
votes
1answer
13 views

CentOS and a small boost example

I ask this question here, because I think, it has more to do with linux than with boost itself. So i created a small cpp file: #include <boost/math/special_functions/round.hpp> #include ...
0
votes
1answer
21 views

To find files like '-file9' files [duplicate]

This is Venkat I was created a file. Name is '-file1'. So how can we open or find these type of files Thanks, Venkat.K
0
votes
1answer
28 views

Remote execution of a file is not working

I'm trying to execute a local file (here /tmp/cmd) on a remote machine (slc05bkt) using SSH. Here's the command I'm trying from a script file: cmd="ssh -v ssuthari@slc05bkt \"bash -l -s\" < ...
0
votes
1answer
20 views

Sudo Apache, with command line ? (not visudo)

I have visudo-edited /etc/sudoers this way: User_Alias APACHE = www-data Cmnd_Alias FIREWALL = /sbin/iptables, /sbin/ifconfig, /sbin/route APACHE ALL = (ALL) NOPASSWD: FIREWALL (To allow php ...
0
votes
2answers
17 views

link cut, find length and cut the new text with the first text's length

I'm stuck up with the below situation. there are two files - sample.war & sample1.48.war now, I've to cut only the first field of the first file. i.e., 'sample'. Next, I've to count the total ...
-3
votes
0answers
14 views

how to run reaver on dsl

I want to run reaver for hacking nearby wifi but I do not want to download the whole kali Linux for it. So I tried kali Linux mini but I had some problem installing it. So now I downloaded damn small ...
0
votes
3answers
21 views

extract url between 2 strings in a file

I have a file in which each line is like this "372"^""^"2015-09-03 06:59:44.475"^"NEW"^"N/A"^""^0^"105592"^"https://example-url.com"^"example-domain < MEN'S ULTRA < UltraSeriesViewAll ...
2
votes
3answers
34 views

How to add “wrappers” around methods in source code based on a pattern, using sed, awk, grep and friends

How can I add wrappers to a file based on a pattern? For instance I have the following: ... find(css_policy_form_stage3).click with_ajax_wait expect(css_coverage_type_everquote).to ...
0
votes
3answers
30 views

Shell Script to change locale has no effect

I wrote a simple script to switch my locale. If I write each line in the console and execute it, it works without any problem or if I put it in .bashrc. However when I execute the script either with ...
0
votes
1answer
25 views

Find the time of the file received in a particular directory

I have a directory called /home/mydir/test A file will be sent from some other team which lands in this directory. How to find what is the time the file came to this particular directory? ( I need ...
1
vote
0answers
29 views

How do I find out hard disk model and serial number in amazon machine?

when check in local machine /proc/scsi/scsi file it contains Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST3160215AS Rev: 3.AA Type: Direct-Access ...
-1
votes
1answer
28 views

error while changing directory using crontab [on hold]

This is my script I am trying to rename the files in folder. rename1.sh ---------- #!/bin/bash cd /home/lanein1/WestonIN7pm/"$(date +%Y-%m-%d)" && rename s/WestonIN/WestonIN7pm/ *.jpg cd ...
3
votes
3answers
159 views

Help with bash script

I am teaching myself bash scripting with the book 'Learning the Bash Shell' by Newbam. I'm getting on OK with the book, but am a bit confused by the following script. It is a script which uses a for ...
2
votes
3answers
611 views

make a process unkillable on linux

I'm working on password manager application, and for security reasons I want to launch an unkillable process. And besides I don't want this program to be a daemon since I need to read from standard ...
1
vote
1answer
35 views

Pass list of directories (that contain whitespaces) to a command in a script

For example, I want to execute the following within a shell script: tar cvpzf /destination/backup.tgz /directory\ one /directory\ two I wish to assign the list of paths (with whitespaces in them) ...
0
votes
1answer
26 views

groupadd: group 'terminal' already exists in Linux

I have created a group called "terminal" using groupadd terminal and when I list out the groups using groups command it will not show the newly created group name in the output but if I add the same ...
0
votes
1answer
26 views

Which file attribute changes when we copy a file from some other user's account?

Which file attribute changes when we copy a file from some other user's account, which may be in our own group or in some other group?
1
vote
1answer
14 views

Can't set extended attributes on ext4 on fedora 22 - operation not supported

I am trying to get extended attributes working on Fedora 22. I can't seem to be able to set the attributes even on my files, but I can read them. Here's how it looks: [jarek@localhost ~]$ cd /tmp/ ...
0
votes
1answer
5 views

mounting a davfs share always asks for credentials

I installed davfs2 on my rPi running piCore-6.1. I added a line with the desired mountpoint to /etc/fstab: https://url.../ /path.../ davfs _netdev,rw,user,uid=1000,gid=1000 0 0 I also created a ...
0
votes
0answers
13 views

Getting the block device from an udev scsi_disk subsystem (udev C API)

I am using the udev C API to monitor connection and disconnection of SATA drives. struct udev_monitor *mon; mon = udev_monitor_new_from_netlink(udev, "udev"); ...
0
votes
1answer
24 views

exclude files in tar.gz

I want to exclude two files from a tar file.. But it doesn't seem to work cd /var/www/public/api_test tar -zcvf api_v2.x.tar.gz api --exclude "./api/distributor_test.php" --exclude ...
0
votes
0answers
11 views

After logrotate my tomcat logs all all zero

I've a problem rotating my tomcat logs. I've the following logrotate-file for tomcat8 (/etc/logrotate.d/tomcat8): /var/log/tomcat8/catalina.out { copytruncate weekly rotate 8 compress ...
0
votes
2answers
63 views

Why does this command not remove files as expected?

This command in my .sh script is supposed to look in /home/backup/VBtest for .sql.gz files and remove any older than 5 days: find /home/backup/VBtest/*.sql.gz -mtime +5 -exec rm {} \; But it ...
0
votes
2answers
12 views

Install software to a windows PC through a linux live instance (e.g. Kali)

A thought experiment. If I had physical access to a PC that was switched off, but I didn't know the password, could I boot into a live linux image and install software on the windows box? Software ...
3
votes
1answer
21 views

IPv4 link-local address in Linux

I remember that in Windows XP, when DHCP client did not receive an IPv4 address from DHCP server, the host assigned itself an IPv4 link-local address from 169.254.0.0/16. However, I have never seen ...
0
votes
1answer
23 views

How to return sequence value in sqlldr from unix shell

I have a test.txt file with column (Serialnumber,value). test.txt: "SEQ_IN_AMT.NEXTVAL",123123 "SEQ_IN_AMT.NEXTVAL",123114 here SEQ_IN_AMT is a sequence name create on Oracle. Now, when I load ...
0
votes
2answers
19 views

Replace values on the basis of matching ID variable

I have two files. file1 has 6 columns, file2 has 2 columns. I want to replace the values in the 6th column of file1 by the values in column 2 of file2, based on matching ID variables (column 1 in both ...
0
votes
1answer
12 views

how to setup VPS domain registered via different service?

I have a domain that was registered with network solutions and my vps is hosted via hostWinds. I got a cheap/budget VPS because I'm a developer by trade and would rather know how to set all this ...
0
votes
1answer
16 views

configuring setxkbmap for a single user/debugging xkbmap changes

I'm trying to do something similar to what this user asked, storing my keyboard layout. My first thought was to use .bashrc, but I turned to .bash_profile after realizing that I only need it set once ...

15 30 50 per page