Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.

Share tech news, updates, or what's on your mind.

Sign up to Post

under Location Profiles i see

Site Location Profiles and Shared Location Profiles. what are difference between them? when to use which one?
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Hello Experts,
I am getting error while execute script from Linux system...

[root@119 bin]# ./BOD.sh
./BOD: -c: line 7: syntax error: unexpected end of file

Script:-
[root@119 bin]# vim BOD.sh
   1 #!/bin/bash
  2 export DISPLAY=:1
  3 cat /root/version.txt |  while read output
  4 do
  5 gnome-terminal \
  6         --tab -t "SMM" -e " sh -c 'sleep 10s; ./startapp SMM' "\

[root@119 ~]# cat version.txt
cd /home/rajat/Desktop/Symbol_4.1.1.1_0812
0
I see 2 of my Centos guests with the same name and cannot edit, or remove from inventory  and most other functions , are greyed out , I am not sure where to look next
0
I have 1000+ of these - and it appears the parent process for each I have checked is the same command... not sure what is going on... any ideas?


8012     32605  0.0  0.0 110016  1264 ?        S    01:21   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32610  0.0  0.0 110016  1268 ?        S    01:22   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32611  0.0  0.0 110016  1268 ?        S    01:21   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32617  0.0  0.0 110016  1272 ?        S    01:21   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32618  0.0  0.0 110016  1264 ?        S    01:22   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32623  0.0  0.0 110016  1268 ?        S    01:21   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32625  0.0  0.0 110016  1268 ?        S    01:22   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32629  0.0  0.0 110016  1268 ?        S    01:21   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32632  0.0  0.0 110016  1268 ?        S    01:22   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32635  0.0  0.0 110016  1268 ?        S    01:21   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32639  0.0  0.0 110016  1272 ?        S    01:22   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32641  0.0  0.0 110016  1268 ?        S    01:21   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32646  0.0  0.0 110016  1272 ?        S    01:22   0:00 /bin/csh test -d /usr/lib64/qt-3.3
8012     32647  0.0  0.0 110016  1268 ?     

Open in new window

0
Eventhough there are no big files there still /opt/ is showing 100% full it very confusing to me. Can anyone help me on this please


root@[opt] # lsof | grep -i deleted
root@[opt] #

Open in new window


root@[opt] # lvs
  LV          VG                  Attr       LSize   Pool Origin  Data%  Meta%  Move Log Cpy%Sync Convert
  isvol1      HKLVAUEDM08_applvg1 -wi-ao----  10.00g
  isvol2      HKLVAUEDM08_applvg1 -wi-ao----  10.00g
  isvol3      HKLVAUEDM08_applvg1 -wi-ao----  10.00g
  tsavol      HKLVAUEDM08_applvg1 -wi-ao----  10.00g
  wmstorage   HKLVAUEDM08_applvg1 -wi-ao----  10.00g
  homevol     rootvg              -wi-ao----   3.91g
  oprvol      rootvg              -wi-ao---- 320.00m
  optvol      rootvg              owi-aos---   3.91g
  optvolsnap  rootvg              swi-a-s---   3.94g      optvol  95.39
  rootvol     rootvg              owi-aos---   5.88g
  rootvolsnap rootvg              swi-a-s---   2.91g      rootvol 69.49
  scbmonlv    rootvg              -wi-ao----   1.00g
  semavol     rootvg              -wi-ao----   1.00g
  swapvol     rootvg              -wi-ao----   5.88g
  tmpvol      rootvg              -wi-ao----   3.91g
  usrctmvol   rootvg              -wi-ao----   2.94g
  usrgemsvvol rootvg              -wi-ao----   1.00g
  usropenvvol rootvg              -wi-ao----   1.97g
  varvol      rootvg              owi-aos---   3.91g
  varvolsnap  rootvg              swi-a-s---   3.94g      varvol  88.16

root@[opt] # df -PH | grep -i "/opt" | grep -i root

Open in new window

0
[root@openstack ~]# yum install mariadb-server
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
rhel-7-server-extras-rpms                                                                                                                            | 2.0 kB  00:00:00
rhel-7-server-optional-rpms                                                                                                                          | 2.0 kB  00:00:00
rhel-7-server-rpms                                                                                                                                   | 2.0 kB  00:00:00
rhel-7-server-satellite-tools-6.2-rpms                                                                                                               | 2.1 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package mariadb-server.x86_64 3:10.1.20-2.el7 will be installed
--> Processing Dependency: mariadb-errmsg(x86-64) = 3:10.1.20-2.el7 for package: 3:mariadb-server-10.1.20-2.el7.x86_64
--> Processing Dependency: socat for package: 3:mariadb-server-10.1.20-2.el7.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: 3:mariadb-server-10.1.20-2.el7.x86_64
--> Processing Dependency: perl(DBI) for package: 3:mariadb-server-10.1.20-2.el7.x86_64
--> Processing Dependency: perl(DBD::mysql) for package: 3:mariadb-server-10.1.20-2.el7.x86_64
--> Processing Dependency: lsof for package: …
0
How to check the time stamp of mv command

i tried as below


bash-4.4$ mkdir new2                                                                                                                              
bash-4.4$ ls ltr                                                                                                                                  
ls: cannot access 'ltr': No such file or directory                                                                                                
bash-4.4$ ls -ltr                                                                                                                                  
total 8                                                                                                                                            
-rw-r--r-- 1 14392 14392    0 Nov 22 17:03 e.txt                                                                                                  
drwxr-xr-x 3 14392 14392 4096 Nov 22 18:23 new                                                                                                    
drwxr-xr-x 2 14392 14392 4096 Nov 22 18:25 new2                                                                                                    
bash-4.4$ mv -u /new/* new2                                                                                                                        
mv: cannot stat '/new/*': No such file or directory                                         …
0
hi,

as given below
http://www.thegeekstuff.com/2010/12/mv-command-examples/
$ ls
file1    file2

$ mv --suffix=.bak file1 file2

$ ls
file2    file2.bak


i tried as below
bash-4.4$ cd root                                                                                                                                  
bash-4.4$ pwd                                                                                                                                      
/home/cg/root                                                                                                                                      
bash-4.4$ ls -ltr                                                                                                                                  
total 4                                                                                                                                            
drwxr-xr-x 3 14392 14392 4096 Nov 22 16:58 new                                                                                                    
bash-4.4$ touch d.txt                                                                                                                              
bash-4.4$ mv --suffix=.bak d.txt e.txt                                                                                                            
bash-4.4$ ls -ltr                                                                                                        …
0
hi,

I am trying as below
mv * to move multiple files but not working
http://www.thegeekstuff.com/2010/12/mv-command-examples/
$ cd chap1

$ ls -F
ex1.c    ex2.c    ex3.c    example/   exercise/  

$ mv * chap2/






bash-4.4$ ls -ltr                                                                                                                                  
total 12                                                                                                                                          
-rw-r--r-- 1 14392 14392  978 Nov 22 16:46 README.txt                                                                                              
-rw-r--r-- 1 14392 14392    7 Nov 22 16:47 456.txt                                                                                                
drwxr-xr-x 2 14392 14392 4096 Nov 22 16:49 dir3                                                                                                    
-rw-r--r-- 1 14392 14392    0 Nov 22 16:56 c.txt                                                                                                  
bash-4.4$ mv * new/                                                                                                                                
mv: target 'new/' is not a directory                                                                                                              
bash-4.4$ mkdir new                                                     …
0
bash-4.4$ mv -i dir2 dir3                                                                                                                          
bash-4.4$ ls -ltr                                                                                                                                  
total 12                                                                                                                                          
-rw-r--r-- 1 14392 14392  978 Nov 22 16:46 README.txt                                                                                              
-rw-r--r-- 1 14392 14392    7 Nov 22 16:47 456.txt                                                                                                
drwxr-xr-x 2 14392 14392 4096 Nov 22 16:49 dir3                                                                                                    


i tried as above but i did not get warning  like below

mv: overwrite `dir2'?


i tested with files also but no warning coming

bash-4.4$ touch a.txt                                                                                                                              
bash-4.4$ mv a.txt b.txt                                                                                                                          
bash-4.4$ ls -ltr                                                                                                                                  
total 12           …
0
Concerto Cloud for Software Providers & ISVs
LVL 5
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

how to search both zip  files and regular files same time

zgrep  "ram" *

grep  "ram" *

i like to combine above two

just use pipe?how to get result count as well on both files or on each file separately

how to create zip file here to test it?
https://www.tutorialspoint.com/unix_terminal_online.php
please advise
0
Hello there,

I have downloaded java jdk-8u144-linux-x64.tar and put it in this location /var/cache/oracle-jdk8-installer and then I add the java 8 repo to apt-get like so
sudo add-apt-repository ppa:webupd8team/java

Open in new window

and then when i try to install java using the following cmd
sudo apt-get install oracle-java8-set-default

Open in new window

. I get error that

The following NEW packages will be installed:
  oracle-java8-set-default
0 upgraded, 1 newly installed, 0 to remove and 132 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6,788 B of archives.
After this operation, 20.5 kB of additional disk space will be used.
Setting up oracle-java8-installer (8u151-1~webupd8~0) ...
Installing from local file /var/cache/oracle-jdk8-installer/jdk-8u151-linux-x64.tar.gz
Removing outdated cached downloads...
sha256sum mismatch jdk-8u151-linux-x64.tar.gz
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

I know the cause of the error and that is it is trying to install the latest version which is 151 and I have version 144 in the /var/cache/oracle-jdk8-installer folder. How can I tell it to use that 144 and not try to use the latest version.

cheers
Zolf
0
hi,
mputty session name how to rename says from server1 to server2

Please advise
0
Hi all

Is it possible for a KVM to communicate with the RAID controller and the disks?
0
what is difference between control D and exit commands.

please advise
0
I have a command like this ...could you explain what each term doing in below command.

scl enable python27 bash <<!
0
hi,
my super user is crm and password is say pwd

sudo crm and sudo su means same or different

what is passwd comand, cut c ommand?
please advise
0
hi,

what are differences between below 3 grep requests


zgrep 'RPT|O|BundleShowing' nine.log.20171029.gz | grep 'Oct-29 23:' | wc -l


zgrep 'RPT|O|BundleShow' nine.log.20171029.gz | grep 'Oct-29 23:' | wc -l



zgrep 'RPT|O|BundleShowing' nine.log.20171029.gz | grep 'Oct-29 23:24' | wc -l


if i have to search from yesterday 11 pm till today morning say 6am how to refine my query.

please advise
0
hi,

when i searched below command
zgrep -C20  'account is persisted'  crm-java_crm23.log.20171025.gz

i saw one match and then 20 lines before and 20 lines after


but all 41 lines are so much clutterred to my eyes i cannot hardly figure out which i s match which are before 20 lines set wheich are 20 lines after set

how to indent and how to give a empty space between each of those 41 lines and also preferably double line space just before and after match
how to change these settings permanently?
please advise
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE
LVL 5
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

grep -n "go" demo_text
5: * e - go to the end of the current word.
6: * E - go to the end of the current WORD.
7: * b - go to the previous (before) word.
8: * B - go to the previous (before) WORD.
9: * w - go to the next word.
10: * W - go to the next WORD

http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/

what is the meaning of above line numbers?
i am not clear on it. can you please advise
0
Syntax:
grep -o -b "pattern" file

$ cat temp-file.txt
12345
12345

$ grep -o -b "3" temp-file.txt
2:3
8:3
http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/
As above what is the  meaning of 2:3 and 8:3
what position it represents
please advise
0
7. Highlighting the search using GREP_OPTIONS

As grep prints out lines from the file by the pattern / string you had given, if you wanted it to highlight which part matches the line, then you need to follow the following way.

When you do the following export you will get the highlighting of the matched searches. In the following example, it will highlight all the this when you set the GREP_OPTIONS environment variable as shown below.

$ export GREP_OPTIONS='--color=auto' GREP_COLOR='100;8'

$ grep this demo_file
this line is the 1st lower case line in this file.
Two lines above this line is empty.
And this is the last line.
http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/

how to get different color when search match comes?
please advise
0
zgrep -C20  'account is persisted'  crm-java_crm23.log.20171025.gz

how to see in above grep 15 lines before grep match and 15 lines after grep match



how to see in above grep 30 lines before grep match and 30 lines after grep match

how to see in above grep 30 lines before grep match

how to see in above grep 30 lines after grep match

how to see in above grep exact match line

please advise
0
hi,

i am going through below link
http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/

what is dfference between below lines
zgrep 'account is persisted'  crm-java_crm23.log.20171025.gz
zgrep -C20  'account is persisted'  crm-java_crm23.log.20171025.gz
zgrep "account is persisted"  crm-java_crm23.log.20171025.gz
grep 'account is persisted'  crm-java_crm23.log.20171025

why the time stamp of file and search result inside is different?
please advise
0
hi,

on a file say
hello.txt
rwxr-x--x permissions there
other group can do x ie execute right?
hw execute different from write?

how exceute different from NONE

lets say
777755700 i have on file called car.txt?
then others have None permission?
is above car.txt means
rwx------
what above means?
please advise
0

Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.

Top Experts In
Linux OS Dev
<
Monthly
>