Tagged Questions
These questions are about Linux in general -- NOT specific to a particular distribution. If the question just happens to be in a Linux environment, please specify your Linux distribution in the body of your question, but do NOT use the /linux tag.
1
vote
4answers
15 views
How do I find a word in a file and insert text two lines below that?
I have a file that I want to find a key word in and enter text 2 lines down.
For example lets say the file i have contains the following words
the
cow
goes
moo
I want to be able to find the word "...
0
votes
1answer
30 views
Issue with echo statement [on hold]
#!/bin/sh
END=$1
i=1
echo "no of msgs2:$END"
let i+=3
echo "$i"
while (($i -lt 5))
do
echo "$i"
done
Result:
no of msgs2:2
4
4: ./perfScript.sh 8: FSUM7351 not found
0
votes
0answers
14 views
Random Linux kernel panics
I have a Core 2 Duo pc with an ASUS ConRoe1333-D667 mobo. It has always run Windows without any hiccup but has strangely always refused to run Linux.
I can't really understand why, I managed to ...
0
votes
0answers
8 views
How can I check how much ram available to add to guest OS on libvirt?
I have a server with 32 gb ram and there is libvirt. There are 12 gb of ram is used. When I try to add ram to my guest OS it is not possible to add more than 12gb ram. How can I check how much ram ...
0
votes
0answers
23 views
Wireless network gets disconnected when i go far from the modem
good day mates. I just installed today my new linux mint 18 cinnamon Rosa which causes me some wifi problem. I can connect my laptop to my wifi if only its near from my router. but the time that I ...
0
votes
1answer
28 views
How to eliminate the need of upgrading my distribution?
I am currently using Ubuntu on my production servers.
I prefer to use arch linux on my desktop as they do never have a version for Operating systems like ubuntu, debian etc, So never have to bother ...
0
votes
0answers
13 views
permission access denied in laravel4.2 in linux
I am new to laravel and am using ubantu when i have installed my project in opt/lampp/htdocs folder it is restricting that some folders permissions denied. when am trying to run the command chmod -R ...
-2
votes
2answers
42 views
cut a text between / / symbols
i have some below strings
2-0 854 0/413/5963 W 65.19 0 0 0.0 4.76 115.86
::1 www.example.com GET /server-status HTTP/1.1
2-0 854 0/413/5963 W 65.19 0 0 0.0 4.76 115.86
...
1
vote
1answer
19 views
How to reduce the boot time of a beaglebone using systemd
I'm currently trying to reduce the time it takes to boot my beaglebone green and start a python script. My simple python script just turns on a relay on a cape.
I'm using the time it takes for the ...
0
votes
0answers
6 views
What steps are involved in configuring bluetooth (bluez4) for sysvinit (3.18 kernel)
I have a Linux build for a Gumstix Overo Y COM (3.18 kernel) which I am trying to get bluetooth working on. The OS is a Yocto/Open Embedded build in which I have included kernel support for bluetooth,...
0
votes
0answers
6 views
access hana studio “cannot display error”
I have my server remotely connected to the sap hana server.I wanted to use sap hana studio by remotely accessing the hana server.But when I access the server with ssh and try to open the studio it ...
2
votes
2answers
133 views
How to find the first vowel in a string
I'm trying to create a pig Latin calculator however am stuck on a certain part. Let's say I have the string "apple". To convert that you'd simply add "way" to the end giving you "appleway". I ...
1
vote
3answers
44 views
find sequences that are in alphabetical order
I want to find all sequences that are in alphabetical order in txt file. not sorting.
in text file have-
aedftg
wqof
abcdef
oufn
pqrs
I want output - abcdef and pqrs
1
vote
0answers
13 views
CPU MSR dumper tool
I'm looking for a linux tool similar to a cpuid dumper but with a capability to read all of a processor's possible model-specific registers's and outputting them. Does such a tool exist? I'm hoping ...
-1
votes
1answer
21 views
First steps in Linux with Raspberry? [on hold]
I really would like to learn more stuff about Unix and Linux, I never worked or used one of them in my life. Now I have two opportunities, the first one is to install a second operationsystem on my pc ...
0
votes
0answers
18 views
Possible to template/overwrite STDOUT?
I am debugging a call stack and simply outputting echo statements from various files. Flat logs are becoming a little difficult to follow, so I'm curious what the best way to nest output may be.
I ...
12
votes
2answers
572 views
What's the difference between `su -` and `su --login`? [duplicate]
From su's man page:
For backward compatibility, su defaults to not change the current directory
and to only set the environment variables HOME and SHELL (plus USER and LOGNAME
if the target user is ...
0
votes
2answers
61 views
Sys files removed (rm -rf /*) help
Today I made a mistake by running:
rm -rf /*
0200:00/power/control': Operation not permitted
rm: cannot remove /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:01/PNP0200:00/power/...
-1
votes
0answers
21 views
How to disable the login shell like VMware ESXi do? [on hold]
After installing ESXi, we cannot see the regular login shell prompt, or the GUI Desktop, only configuration options. Can anyone tell me how to disable the shell, and how to implement the ...
0
votes
2answers
13 views
Create a linear array with RAID over a non-empty disk
I have a disk of 500GB (465GB formatted) and one of 80GB (72GB formatted), and I wanted to create a linear array i.e. append the space of both disks with software-managed RAID tool mdadm. The bigger ...
-2
votes
0answers
12 views
Kali Linux Wifi on Dell inspiron 3420 [on hold]
the problem with my kali linux is that it doesn't installs the wifi driver. I tried to do it manually but still no use.
-4
votes
0answers
15 views
Openssl error 14077410 [on hold]
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure.i have tired install ssl
-1
votes
1answer
20 views
Variables with equations
How would I create a variable that solves an equation.
For example,
t=20
s=(t+30)
I got the t=20 pretty easy but when it came to using the echo command for s, the output ends up being 20+30 instead ...
0
votes
4answers
34 views
zsh set as default shell for root
Can I set zsh as default shell while being logged in as root? I did chsh -s /bin/zsh and used my root password for authentication, but failed.
0
votes
0answers
13 views
Chat program not sending the data to other user
I am writing two programs in Ubuntu which will run and each terminals and chatting can be done . But when I type something in terminal 1 , text doesn't goto terminal 2 and when I type in terminal 2 ,...
0
votes
1answer
15 views
x86 Emulator for Linux with detailed debugging
I am looking for a x86 emulator so that I can run my Linux kernel inside it. I am specifically looking for an emulator that shows all the function calls in C/Assembly level from bootloader, all the ...
0
votes
2answers
15 views
create a new column based on existing columns using if else statement in awk
I am a newbie to awk, and I have tried to work on this for hours but not been successful. I have a dataset with > 7 Mio rows (and in reality >20 columns), and would like to create a new column (my ...
2
votes
1answer
141 views
How can I compute the size of my Linux install + all my applications?
I don't have a separate / and /home partition, but I would want to know how much HDD space my system, applications and all of the configs take up?
I am asking because I might buy a very cheap SSD, ...
1
vote
0answers
20 views
Set static permissions on shared folders
I have a folder I use for Steam games, and it's shared between Linux and Windows systems. I have this problem that if Windows system has accessed the folder it changes the permissions, locking out ...
-2
votes
1answer
37 views
delete recursive subfolders with find
I need to delete recursive subfolders in a single line
For one subfolder:
find folder -name "subfolder" -exec rm -r "{}" \;
or
find folder -name "subfolder" -type d -exec rm -r "{}" \;
But in the ...
3
votes
1answer
119 views
Recover su password after modifying /etc/shadow
I follow a tutorial about the race condition exploit.
I made a copy of my /etc/shadow file.
And then replace all the contain by one line
root::1:99999:::::
However. My old password doesn't work ...
1
vote
1answer
25 views
using random in tar to decompress files
i want to decompress tar to specific folder, using random (
or anything else), because the content of tar is similar
In Win/batch random is used:
SET /A num=%random% %%100
for /d /r . %%d in (%...
0
votes
0answers
5 views
linux questios dow-voting or up-voting [migrated]
My question is.... "Why does LQ permit down-voting and up-voting with neither reason NOR identification?" It seems to me that IF a person were able to identify whom or WHY they down-voted, one could ...
-1
votes
1answer
14 views
Crontab every hour and email changes help? [on hold]
how would i go about using a crontab to hourly check the integrity of some files for example if I wanted to check any changes to /etc/passwd using either md5sum, md5deep, or hashdeep. And then for it ...
-3
votes
1answer
16 views
How to partition VPS? [on hold]
I have 50 GB storage VPS and I would like to partition this 50 GB into 10 GB each partition.
This is my partition layout defaultly:
vda1 - primary - 49G
vda2 - primary - 1G
And I want to partition ...
0
votes
0answers
31 views
Which Linux distro for programming [on hold]
I want to switch from Windows because I'd like to learn Linux and it will come in handy since I'm studying computer science and engeneering.
Currently I need to write some Java and C code. Plus I ...
0
votes
1answer
27 views
`apt clean` vs `apt-get clean`
Are these apt commands identical to their apt-get counterparts / namesakes?
apt clean
apt-get clean
apt autoclean
apt-get autoclean
apt autoremove
apt-get autoremove
They do appear to be. ...
0
votes
2answers
23 views
behavior of ServerAliveInterval with ssh connection
Using ssh I am logging to another system and executing scripts there that creates new machines, and do some setups. It takes around 7-8 hours. So what happened is, the ssh connection keeps dropping ...
-5
votes
0answers
22 views
Removing directory using relative pathnames [on hold]
Having trouble with this.
Question: Your current directory is stenton. Remove the security directory, including it's contents (no prompting), using a relative pathname
security sub-directory under "...
-2
votes
0answers
38 views
a function to download a lot of compress files and decompress to a random folder [on hold]
Problems:
Descompress files into a subfolders
sub=mkdir -p {a,b,c}
# decompress
function decompress() {
wget -c --retry-connrefused -t 0 "$1" && cat *.tar.* *.tgz | tar -C dir/$sub -zxvf - ...
0
votes
1answer
25 views
how to unzip to a differently-named file
I need to unzip to a file.txt (not a folder or anything else)
something like that:
unzip test.zip -d >> file.txt
test.zip contain a single file called "x.txt". I do not want to uncompress as ...
1
vote
0answers
21 views
Binding an I2C device driver
I am attempting to use a TCA8418 keypad (which operates over I2C) and I have the driver loaded into the kernel, but the device was not recognized so I am instantiating it myself and am unable to bind ...
1
vote
2answers
30 views
How to subtract dates from colums using awk?
I have three columns like this:
18:37:12 18:37:31 0
18:37:01 18:37:18 0
I would like to have the third column be populated with the difference in seconds of the two first columns like this:
...
0
votes
0answers
11 views
Relative-to-home pathway [duplicate]
sample_dir1
`-- sample_dir
|-- admin
|-- cambridge
| |-- cafeteria
| `-- library
|-- faculty
|-- history.exe
|-- markham
| |-- annex
| |-- annex2
| |-- building1
| `-- parking
|-- oxford
...
0
votes
1answer
42 views
Replace multiple lines on a file with other text [on hold]
I am in the process of modifying some file configuration on several servers and I need to replace the example.conf file which contains the following:
#Please put the servers that are intended to be ...
5
votes
1answer
348 views
Unknown Filetype in ls
In general, what are the reasons why a filetype might show as unknown (?) in ls output?
See the first bit for the file /sbin/start-stop-daemon, which should indicate - for "regular file", instead is ...
1
vote
2answers
22 views
Take maximum value from a column and extract all lines with at least 20% of this value
I would like to find the maximum value of column B AND keep all lines where column B values are 20% or more of the maximum.
INPUT DATA
A B C D E
2 79 56 SD L
1 09 67 JK S
9 60 37 KD G
0 10 47 SO E
...
0
votes
2answers
32 views
Long Delay Before Curl Download [on hold]
I have a bash script that checks to see if a file exists in a web directory. If the file doesn't exist, it simply quits. If the file does exist in the web directory, it downloads it.
The script works ...
-2
votes
0answers
20 views
Is it necessary to source .bashrc / .bash_profile file after export [on hold]
If we set an environmental path using export after that is it necessary to source .bashrc file or not.
-2
votes
1answer
22 views
Frozen processes not listed in **top** [on hold]
Sometimes, processes froze without even appearing on the top terminal. This happens quite much with Adobe pdf reader to me, but also other processes. What can I do when this happens?
I can not find ...