Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
48 views

Noticed very large space utilisation in linux LVs, how to find which file or what is responsible here?

I have two disks in my server with a LVs created and issue is on the one mounted on /. I am aware of using find and sort to output the largest for some given number of lines. like: find / -type f -...
animorph's user avatar
0 votes
1 answer
1k views

How can I correctly run a java batch application (a .jar application) in background on a Linux machine?

I am not a system engineer (I am a software edeveloper). I have to run a Java application (a runnable .jar file) on a Linux machine (Centos 7). I am connecting to a shell via SSH. This application is ...
AndreaNobili's user avatar
  • 7,201
-2 votes
1 answer
1k views

Getting an error when attempting to install Homebrew on CentOS 7: “Error: Unknown command: shellenv���

I am trying to install brew on CentOS 7 and get the following error: [jalal@goku ~]$ git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew Cloning into '/home/grad3/jalal/.linuxbrew/...
Mona Jalal's user avatar
1 vote
1 answer
78 views

How to preview variable substitutions for a command?

u2api --zuser="$USER" --outfmtput=json SQL create_database name=$DATABASE I would like to easily (e.g. no escaping if possible) print the resulting command instead of executing it. Is there any ...
beppe9000's user avatar
  • 681
0 votes
1 answer
145 views

store into variable a sudo result

I have this simple script #!/bin/sh ISUP=`sudo /etc/init.d/jboss7 status | grep running` echo "ISUP: " $ISUP if I run it manually it works fine [jboss@suc072-ipos ~]$ sh a.sh ISUP: JBoss AS 7.1.1 ...
Vivy Rojas Valverde's user avatar
-1 votes
2 answers
293 views

formatting output in bash shell to remove special characters - linux

I am issuing the command below against a logfile grep "Oracle Audit" /var/adm/messages | awk '{print $6}' How do I format the below output Audit[9460]: Audit[10507]: Audit[10507]: Audit[10507]: to ...
Noob's user avatar
  • 1,625
4 votes
2 answers
4k views

bash script.sh vs ./script.sh vs #shebang

Assuming i am in a bash shell now and i execute the following [me@server]$ bash script.sh q1) Is a new child bash process created to execute the script ? If i do a [me@server]$ ./script.sh q2) ...
Noob's user avatar
  • 1,625
53 votes
3 answers
115k views

Difference between ${} and $() in a shell script

$ echo $(date) Thu Jul 2 16:33:11 SGT 2015 $ echo ${date} $ name=foo $ echo $(name) ksh: name: not found $ echo ${name} foo Seems like ${variable} is the same as $variable, while $() is to execute ...
Noob's user avatar
  • 1,625
1 vote
1 answer
3k views

echo "something" > file not working when sh script is being executed by remote PHP server

I've got a web-server with my hardcoded webpanel for Source server management and I've got my VPS on CentOS which doesn't really want to execute sh script when asked from remote server. Web-server ...
Josh's user avatar
  • 11
0 votes
1 answer
5k views

chsh doesn't change shell

I'm using CentOS 6.5, and the chsh command does not work. I've tried under my account and as root, each time using both the full argument chsh -s /bin/tcsh and using just chsh and following the ...
vaindil's user avatar
  • 1,299
1 vote
1 answer
122 views

How to fix.. my watch --interval=60 isn't working properly

Here is the code I use in my CentOS 5 32bit. But after this I see only some of files are zipped and a lot of them isn't included in produced gzip file. nohup watch --interval=60 tar -zcvf /home/C/`...
user263271's user avatar
1 vote
1 answer
132 views

How interact in for with bash?

I know this must be sound a weird question, but for me, that always developed in C, C++ and Java (and now in bash) seems more weird tough. I'm trying to check if md5 and filename from two list (one ...
Valter Silva's user avatar
  • 1,381
2 votes
2 answers
2k views

Why there is difference between output of linux command du and ls?

I have a file in linux machine whose size is 3404494030 upon doing "ls -l". When I do "ls -lh" it shows 3.2 GB which is correct when converted from bytes to Gigabytes. But when I do "du -h" for the ...
user avatar
2 votes
1 answer
13k views

linux shell installing packages automaticc

I want to install packages automatically by running a script I can write yum install php but I want it to install another package once installation of the php package is completed Is there any ...
user avatar
15 votes
3 answers
97k views

how can i install CentOS 6 without the gui?

i just downloaded the centos 6 live cd and i tried installing it on virtually and i am never prompted to install centos with/without gui and its all automated. what happends is after i am booted into ...
Exploit's user avatar
  • 639

15 30 50 per page