Linux OS Dev

8K

Solutions

3

Articles & Videos

7K

Contributors

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

Imagine the following scenario:

A NAS box, providing a samba share, with several versions of a fíle collection in dated directories (name i.e. "2017.05.24").

On the NAS should be some links into subdirectories of the latest version, so the copy script should create symbolic links on the share to the latest version of that file collection.

When I try
ln -s <samba_share/link_name> <samba_share/dated_dir_subdir/>

Open in new window

I get an error that this is not possible. Any hint ?
0
Stressed Out?
Stressed Out?

Watch some penguins on the livecam!

Hi guys,

Although I find it hard to believe that what I'm looking for even exists, I'll still try my luck.

Is there any Linux Based IDE with native support for bash scripting?
(I don't only mean things like syntax highlighting but also auto completion and etc.) and preferably with git support.

Is there anyway to get a compiled bytecode from a bash script? I know about SHC but it doesn't really help becasue reversing it is way to easy - there's already a ready shell script to reverse the SHC compilation called UNSHC.
0
Hi,

what are the best practices and features, options while using grep.

i am using these days to search in log files, files, directories, content etc

When should i give single quote '  '
like
zgrep 'xyz' aaa.gz


When should i give double quote " "
like
zgrep "xyz" aaa.gz


how to use tail and head etc along with grep to effectively monitor last or first 100 lines etc
please advise
0
Hi,

I keep getting below error when i wrote hello.sh shell script file and try to open it to.



Swap file ".hello.sh.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:



why it created .swp file autoatically?
why it asks above question. How to tell unix not to ask that question.
please advise
0
Hi,
what are differences between
user defined, environmental. local, global variables

when to use which one. what are advanatages, disadvantages of using each with practical examples.
please advise
0
Hi,

I like to write a unix shell script to check calendar year, date, current working directory.

how to write and shave .sh file(Say test.sh) and how to execute to see the output.

Any detailed link explaining these steps with screenshots. please advise
0
Hi,

I like to delete matched pattern in a file using vi editor and sed command

i tried as below not working

$ sed 'hello' aaaa.txt :% aaaa.sh


please advise
0
I am trying to build nodejs from source code.

WARNING: C++ compiler too old, need g++ 4.8 or clang++ 3.4 (CXX=g++)
creating ./icu_config.gypi
* Using ICU in deps/icu-small
Using version-specific floating patch tools/icu/patches/58/source/i18n/digitlst.cpp
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'asan': 0,
                 'coverage': 'false',
                 'debug_devtools': 'node',
                 'force_dynamic_crt': 0,
                 'gas_version': '2.20',
                 'host_arch': 'x64',
                 'icu_data_file': 'icudt58l.dat',
                 'icu_data_in': '../../deps/icu-small/source/data/in/icudt58l.dat',
                 'icu_endianness': 'l',
                 'icu_gyp_path': 'tools/icu/icu-generic.gyp',
                 'icu_locales': 'en,root',
                 'icu_path': 'deps/icu-small',
                 'icu_small': 'true',
                 'icu_ver_major': '58',
                 'node_byteorder': 'little',
                 'node_enable_d8': 'false',
                 'node_enable_v8_vtunejit': 'false',
                 'node_install_npm': 'true',
                 'node_module_version': 48,
                 'node_no_browser_globals': 'false',
                 'node_prefix': '/usr/local',
   …
0
as per the output below i am getting some waiting for an event.  every time it is stuck at poll As i have limited skills in strace, can some one guide me to find the root cause of the slowness.


munmap(0x7f14322fb000, 4096)            = 0
socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 5
connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.x.x.1")}, 16) = 0
poll([{fd=5, events=POLLOUT}], 1, 0)    = 1 ([{fd=5, revents=POLLOUT}])
sendto(5, ">a\1\0\0\1\0\0\0\0\0\0\trhn1-01-c\5myc\2ca\0"..., 36, MSG_NOSIGNAL, NULL, 0) = 36
poll([{fd=5, events=POLLIN|POLLOUT}], 1, 5000) = 1 ([{fd=5, revents=POLLOUT}])
sendto(5, "\242:\1\0\0\1\0\0\0\0\0\0\trhn1-01-c\myc\2ca\0"..., 36, MSG_NOSIGNAL, NULL, 0) = 36
poll([{fd=5, events=POLLIN}], 1, 4999



[root@ tmp]# strace -e poll yum repolist
Loaded plugins: product-id, search-disabled-repos, security, subscription-manager
poll([{fd=5, events=POLLIN}], 1, 10)    = 1 ([{fd=5, revents=POLLIN}])
poll([{fd=5, events=POLLOUT}], 1, 0)    = 1 ([{fd=5, revents=POLLOUT}])
poll([{fd=5, events=POLLIN|POLLOUT}], 1, 5000) = 1 ([{fd=5, revents=POLLOUT}])
poll([{fd=5, events=POLLIN}], 1, 4999)  = 0 (Timeout)
poll([{fd=6, events=POLLOUT}], 1, 0)    = 1 ([{fd=6, revents=POLLOUT}])
poll([{fd=6, events=POLLIN|POLLOUT}], 1, 5000) = 1 ([{fd=6, revents=POLLOUT}])
poll([{fd=6, events=POLLIN}], 1, 4999)  = 1 ([{fd=6, revents=POLLIN}])
poll([{fd=6, events=POLLIN}], 1, 4999)  = 1 ([{fd=6, revents=POLLIN}])
poll([{fd=6, …
0
My  VMware machine is not booting.
"vsd-mount                      [!!]
you have entered the recovery shell. the situation you are in may be recoverable.
if you are able to fix this situation the boot process will continue normally after you exit this terminal
/bin/sh: can't access tty; job control turned off"
0
On Demand Webinar - Networking for the Cloud Era
LVL 8
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Hello Folks,

I have a script *.sh That I like to install to few machines (IPs Address), is there anyway anybody can help me write script to do multiples at the same time ?

By the way I'm currently using centos x64

I'd appreciate it and thanks for looking
0
i have some old unix disks that are on 3.5 and i need to access the data on them, i have loaded up linux and hae been trying to load them but to no success have tried
$ mkdir /mnt/floppy
working through this page
https://www.bleepingcomputer.com/tutorials/introduction-to-mounting-filesystems-in-linux/
0
I have the following output i want to write a python code to read only $### and store in a list.

3/14/17
DiningGINO'S PIZZA
Dining ...2121$15.81
Open Drawer3/14/17
DiningBoosty
Dining ...2121$5.65
Open Drawer3/14/17
Tim Hortons Tim Hortons
Dining ...2121$5.60
Open Drawer3/11/17
DiningENCcont
Dining ...2121$8.76
Open Drawer3/11/17
...
output omitted.
0
Hi Guys,

Machines on my network recently updated to version 52, which has caused a lot of problems, i managed to get a copy of the 51 deb, but there are one or two machines, when after running "purge firefox" and trying to install version 51 from running dpkg -i firefox.deb it just wont install, if i do apt-get install firefox it works, but only version 52.

I am connecting to these machines over netcat
0
Dear Experts

I have installed rhel7 and httpd24, rh-php56 and mysql56 this is required for sugarcrm7.8 with the default repos and as well additional with the  repo  rhscl I am not getting the php56-php-mcrypt , without this it is not becoming possible to install the Sugarcrm7.8, can you please suggest where I can get the package php56-php-mcrypt. thanks in advance
0
I am logged into Linux box and I am not good in commands

I am attaching screen shot, I need to select continent, time zone

I don't know  what next steps to take,

can some body guide me in taking what key board steps
C--Users-ic1pxk-Desktop-Capture.JPG
0
My computer is running Windows 10 Pro, 64-bit.  My C language files or my code (program) are stored in the hard disk.  

The old and new version of WindRiver Diab Compiler are stored in Linux Server?

My bash profile used to contain path to old compiler.  To compile, I ran Winscp to access Linux Server.  Then, I dragged my C language project to Linux Server.  I opened the command window from Winscp and invoked make program to build my executables.  This all worked fine.

To build with new compiler, I changed path in my bash profile but my code (program) is still getting build with old compiler.  The generated .map file shows path to old compiler.

My bash profile is stored in my windows desktop.  Does Winscp read bash profile when it is invoked?  How does it know to read bash profile from desktop?  Why is my program not getting built with new compiler?
0
in bash file i have a if statement

if [err -gt 0] then  # if err greather that 0
 stat=error
elsif [war -gt 0] then
 stat=warning
elseif [rng -gt 0] then
 stat=wrong
else stat=OK
fi

syntax error near unexpected token `else'
'else stat=OK'

what is wrong her
0
What i do wrong here with this command
i sat (in linux)
new=test
den i have test.log files. when i say NR==30 {print $1; exit}' $new.log from command line
get successfully first variable which is 2. but in bash file want to put this number in variable say
err=awk 'NR==30 {print $1; exit}' $new.log
get field  NR==30 {print $1; exit}: command not found
0
Announcing the Most Valuable Experts of 2016
LVL 6
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

i create a file:

{print f("set echo off feedback off heading off\n
               set pagesize 0 newpage 0 space\n
              spool /u01/.../$new_load.ctl\n") }
 {
   if (NR == 1) {
      printf("select %s\n", $1)
   } else {
       printf("      ||','||%s\n", $1)
   }
}

END {
   print("from  ${new};\n")
}

Open in new window

output should look like:

set echo off feedback off heading off
               set pagesize 0 newpage 0 space
              spool /u01/.../$new_load.ctl

select NAME
      ||','||FNAME
      ||','||ID
  from test;

Open in new window

but i get completely different $new = test is not reading her and first 3 lines repeated after each line.  

this file name is lo.awk running like this and ${new}_col.txt contains columns name (like name,fname,id)

gawk -f lo.awk ${new}_col.txt > ${new}_lod.sql
0
How to hide (encrypt) database user password in .bash file.
i have a bash file like that
sqlplus  dev/dev123@test @"create.sql"

in this file want to hide or encrypt password (dev123)
0
I have a file with cloumns from tables
i want to create a file like this

select name ||','|| fname ||','|| id from test;

i write a awk command like this

gawk 'BEGIN{print "select"} {print ($1,"||","'\''",",","'\''","||" )} END{print "from test;"} ' cloumns.txt |paste -sd " " >test.sql

but i get a file look like this
select name || ' , ' || fname || ' , ' ||  id|| ' , ' ||
there is to much space between || and '
and the llast one is not be there.
0
is there any way in the kickstart configuratior to do this ? can this be some by manually editing the kickstart file?

thanks!!
0
is there a simple funtion like RDP for windows that I can use a GUI with out having to be on the console?

thanks
0
or option 2 what centos ISO do I need and how can I install x-window ,

it would be better to have the ISO with x-window installed already

thanks!
0

Linux OS Dev

8K

Solutions

3

Articles & Videos

7K

Contributors

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
>