[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Linux

65K

Solutions

33K

Contributors

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.

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

Sign up to Post

Hi Team,

I need to know the Linus command which will list the no of core in a cpu for both VM and physical machines.
0
Big Business Goals? Which KPIs Will Help You
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Hi Team,
I want to know the difference in the output of the below unix commands

ls -F

ls -F I get the output with directories suffixed with a / , but some regular files suffixed with * , @ symbols. Why is it so?

[root@localhost ~]# ls -F
abc.txt          Desktop/     install.log.syslog  Public/     testfile*
accounts/        Documents/   logdata             Templates/  test.ksh*
anaconda-ks.cfg  Downloads/   LOGFILENAME         test        typescript
backup/          $file        Music/              test1       Videos/
CALNOV           filename     novcal              test123@
cc               install.log  Pictures/           test2



ls -d list only the current directory , but ls -d */  , is there any other command to list only directories.
0
Dear Experts,

I am thinking to use SSIS to do the following procedure.

(1) copy many files to Linux machines. then
(2) execute a Linux program (command) to analysis those files. The program will output the result to the local Linux drive
(3) when (2) is done, then pull the result back to Windows machine

For (1) I am thinking of FTP task (by FTP or SFTP)

how about the task of (2) and (3) ?  Could you please help ... Thanks
0
Is it possible to create a cross-platform desktop application in Visual Studio 2017 that will run in both Windows 10 and Linux environments (how is it done)?  
I don't see any "New Project" options that stand out, nor much information on the web.

Thanks
1
I've installed a version of the Unifi Controller to the AWS cloud before, but it's been over 6 months. I went to install a second, built my EC2 on AWS as per the instructions, but then I couldn't get the UNIX commands to work after install. It was flawless before. I'm not getting anywhere with searching on the error.

Here's the command from the instructions that fails after launching the instance:

Once you connect to the Server and are greeted with the Ubuntu Command Line Interface (CLI), do the following:
5.1. Add the Ubiquiti repository to /etc/apt/sources.list:
echo "deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti" | sudo tee -a /etc/apt/sources.list

HERE's what I get...

Complete!
[ec2-user@ip-172-31-22-106 ~]$ echo "deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti" | sudo tee -a /etc/apt/sources.list
tee: /etc/apt/sources.list: No such file or directory
deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti

The instructions are found at:  https://help.ubnt.com/hc/en-us/articles/209376117-UniFi-Install-a-UniFi-Cloud-Controller-on-Amazon-Web-Services

Has anyone RECENTLY gotten the Unifi Controller installed on AWS?  I didn't even get to the point of installing the controller. Just made it to the point where it would pull it down.

Thanks,
Ken
0
OS: RedHat / CentOS

I can use realmd to allow specific Active Directory users/groups to log in to a Linux server.  
a1) The default behavior after joining AD and enabling these AD users to log in is: log in as ADUserName@mydomain.com, provide AD password when prompted, and you're in
b1) On login, the bash prompt looks like: ADUserName@mydomain.com@servername.  
c1) I add ADUserName@MYDOMAIN.COM to sudoers, and these users have admin rights if they need it
It all works just fine.

I had a request to make it so that (users who can't bear to type a few more characters) Ad users could log in, using their Ad password, but without having to specify the domain name
So, I make a few changes to /etc/sssd/sssd.conf and it kinda works.  I think I'm missing something.
Now, it looks like this
a2) log in as ADUserName (note: not providing name of AD domain anymore), provide AD password when prompted, and you're logged in.  So far, so good
b2) the bash prompt looks like: ADUserName@servername.  Not ideal.  This is not a local user, IMO the bash prompt should include the AD domain name.  How do I change this back?
c2) the sudoers file had previously been modified to include ADUserName@mydomain.com.  Now, the logged-in AD user can no longer use sudo.  To fix this, I had to modify the sudoers file again, specifying ADUserName instead of ADUserName@MYDOMAIN.COM.  Again, far from ideal.  This might be confusing to anyone except the person who originally set this up - not good.

0
Hi Expert,

I have a SFTP job which is failing while transfer file for source to dest using "put" command.  As put command only works for single file.

Here my requirement is i want to transfer all the files available in "source/dir1/dir2" and want to merge them into single file then wanna SFTP.

Note:The script should also need to check how many files are there in the source directory before merge them!

thanks in advance.
0
Hi Expert,

How Bundle XML files together into a ZIP using shell script.

Your Comments will be really Appreciate.

Thanks,
0
Dear All,

I am facing issue after creating user in kolab-webadmin. User is getting created through kolab-webadmin, but while logging into round cube web-mail getting attached error. I saw no folder with the user name in imapd spool folder. Can any one help me to resolve the issue.
error.PNG
0
Hi, I was wondering if someone could please help me figure out a way to change the template's theme name as shown below, on the urls in the head section of my site without actually renaming the folders/directories on the template itself.

If I were to rename the folders on the actual template structure, everything would break, and even if it didn't, the automatic theme updates would not work, and for that reason, I need to figure out a way to mask, or rewrite the urls without breaking the theme template.

I have been searching online for a way to do this on my server, but no luck so far. Please help.

<link href="/templates/template-name/css/theme.9.css?v=1537979830" rel="stylesheet" id="theme-style-css" />
      <link href="/templates/template-name/css/theme.update.css?v=1.15.7" rel="stylesheet" id="theme-style-update-css" />
      <script src="/media/jui/js/jquery.min.js"></script>
      <script src="/media/jui/js/jquery-noconflict.js"></script>
      <script src="media/system/js/copyright.js"></script>
      <script src="/templates/template-name/vendor/assets/uikit/dist/js/uikit.min.js?v=1.15.7"></script>
      <script src="/templates/template-name/vendor/assets/uikit/dist/js/uikit-icons-fjord.min.js?v=1.15.7"></script>
      <script src="/templates/template-name/js/theme.js?v=1.15.7"></script>

My server configuration is as follows:

Red Hat Enterprise Linux Server 7.5

Plesk Onyx Version 17.8.11

PHP 7.2.11

Apache and FPM Application served by Nginx
0
Microsoft Azure 2017
LVL 12
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Hi, could somebody please help me with this issue?

I started having problems loading a script on my site that I use to load a booking calendar, and I no longer see it working (no room type or any of the other functions it used to have . I get an error on the web console that I haven't seen before, so I guess if I can get this resolved everything should work again.

I have a few hotel pages on my site and they all use the same script. Here is one of these pages:

https://allinclusivepromotions.com/cancun-mexico/villa-del-palmar-cancun-resort.html

I have attached the js file referred on the error.

Please help.

Thanks,

Jorge B.
0
Hello EE,

I recently installed a vsftp instance on centos7 , i have it configured for "active" mode i thought . Initially, it worked great for about 12hours , including from windows ftp client then I get a 425 error about data port and PASV mode on a windows shell ftp client . I need to use the windows ftp client / active mode setting . Below is the current config


# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/xferlog
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow 

Open in new window

0
Hello all,

I am attempting to write a Linux bash script to read the file directory off an external drive. i would like to be able to pull a quick list of the file directories so that i can save them for future reference.

thank you in advance
0
Hi:

Running PHP 7.0.27 on AWS EC2 linux.

I have a timer operating in a crontab which leads to a PHP script where I search for a particular user who has left their client with the app page unused for the timeout period. This timeout period is known by checking their DB entry using a UTC code when it was written.

Having ID'd the user's member number, and therefore the session_id in the table, I want to use the above script (used by crontab) to kill this user's session in the server so that whenever they try to use the app it will fail and they will get a message about logging off.

For my PHP script at the start I have ..
session_start();
session_id();
:
EG below goes here
:
And at the end of the script I have ..
session_destroy();


The crontab works fine. The script is good till the session-killing part. Here's what I found on the internet at php.net/manual/en/.. :

EG:
$session_id_to_destroy = 'nill2if998vhplq9f3pj08vjb1';	// From DB entry

// 1. commit session if it's started.

if (session_id())
{
    session_commit();
}

// 2. store current session id

session_start();
$current_session_id = session_id();
session_commit();

// 3. hijack then destroy session specified.

session_id($session_id_to_destroy);
session_start();
session_destroy();
session_commit();

// 4. restore current session id. If don't restore it, your current session will refer to the session you just destroyed!

session_id($current_session_id);
session_start();						// A

Open in new window

0
Hello Experts,

I have an uncomfortable problem that I need to be solved as soon as possible. I have this:

CENTOS Linux Server
Apache
Postfix
Postgrey
Amavisd
Spamassassin
Fail2ban
Iptables

On this Server I have several mailboxes of my customers. It is POP and SMTP Server for all those mailboxes.

Many of my customers receive emails sent by enterprises and companies which use the Amazon Simple Email Service (www.amazonses.com), a very known email-marketing service from AMAZON corporation. That's OK, no problem with that.

But there are at least two or three specific senders, who use this service (it looks they are Spammers), whose emails I want and need to reject / discard. I am trying to do this through my /etc/postfix/access file. The problem is:

1) If I try to reject / discard them by their From email address or domain name, their emails are not blocked, they enter normally to our mailboxes:

spammerdomain.com.br REJECT (the domain name is masked)
spammerdomain.com.br DISCARD
badaddress@spammerdomain.com.br REJECT (the email address is masked)
badaddress@spammerdomain.com.br DISCARD

2) If I try to reject / discard them by the Amazonses Domain, so, they are really blocked:

amazonses.com REJECT
amazonses.com DISCARD

But, I don't want to block all Amazonses users, it is a serious service. I want to reject / discard just these two or three Spammers.

Questions:

Why this happens?
How can I accomplish it?

See below the Header …
0
I'm pretty new to Oracle; using Oracle 12.2 Container Database on Linux SunOS 5.11 11.3 sun4v sparc sun4v.  I am trying to use a shell script to loop through all pdbs in my container for a healthcheck.  I saw your PL/SQL @ https://www.experts-exchange.com/questions/29024990/PL-SQL-Loop-through-to-connect-to-Oracle-PDBS-and-run-script.html but it returns insufficient privs for me as sysdba or sys.  Below is my simple script.  I'm trying out this site - but if I'm at the wrong place for Oracle / SQLPlus - please advise.  Thank you in advance.

#!/bin/bash
ALL_DATABASES=`ps -efZ | grep [p]mon | grep -v asm | awk '{print $NF}' | sed s/ora_pmon_// | grep -v / | grep -v "-"`
LOGFILE=dba_list.txt
cd `dirname $0`

for DB in $ALL_DATABASES
do
   export ORACLE_SID=$DB
   export ORACLE_HOME=`grep "^${DB}:" /var/opt/oracle/oratab|cut -d: -f2 -s`
   export PATH=$ORACLE_HOME/bin:$PATH
   export rundate=$(date "+%Y%m%d")
   
 --- if container loop through pdbs
 
   echo "---> Database $ORACLE_SID, using home $ORACLE_HOME"
   sqlplus -s / as sysdba<<EOF
        define sid=$DB
        spool &&sid..dba_audit.html
        @02-set_sql_env.sql
        @03-html.sql
exit;
EOF
        while read a b; do
        if [ $a$NODE == $ORACLE_SID ] || [ $a == $ORACLE_SID ]; then
                echo "To: $b">mailheader
                echo "Subject:$ORACLE_SID DBA_AUDIT ${rundate}">>mailheader
                echo "Content-Type: text/html">>mailheader
                echo ""
  …
0
I have a small Wordpress web site currently running on a Linux VM using nginx.
I'd like to dump my HP Microserver that's running the Linux VM and replace it with a Synology NAS.
Is there a way to run a Wordpress site on a Synology NAS?
0
Ubuntu 16.04.1

I run Nagios on this server.

I have a directory that contains .cfg files

I would like to move those .cfg files to and archive directory  

Tying to use the mv command and add a suffix to the end of the files.

#!/bin/sh

today=$(date +%Y-%m-%d)


mv -v -b --suffix=.'today'-TG *.cfg archive

Open in new window


 root@tgcs017:/usr/local/nagios/etc/objects/desktops# ./update.sh
'TGKW001.cfg' -> 'archive/TGKW001.cfg'
'TGKW003.cfg' -> 'archive/TGKW003.cfg'
'TGKW004.cfg' -> 'archive/TGKW004.cfg'
'TGKW005.cfg' -> 'archive/TGKW005.cfg'
'TGKW006.cfg' -> 'archive/TGKW006.cfg'
'TGKW007-10.cfg' -> 'archive/TGKW007-10.cfg'
'TGKW008-10.cfg' -> 'archive/TGKW008-10.cfg'
'TGKW009.cfg' -> 'archive/TGKW009.cfg'
'TGKW012.cfg' -> 'archive/TGKW012.cfg'

the script is simple and it runs it moves the files but never adds the suffix.

Any ideas?

Thank you
0
Hi.

I've installed FreeIPA server. It works but after 10 minutes gives me error. Here is the error. Seems some certificate error. I have less expierence with FreeIPA anybody, could you please help fix this issue ?

0
Fundamentals of JavaScript
LVL 12
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Greetings EE'ers,

For testing and educational purposes, I run VMWare Player on my computer and put various Windows and Linux VM's in it.  I'd like to move that to the cloud so that I can access them easily, and not have to provide all of those hardware resources on my workstation.

What is a good low cost service that I can put test Windows and Linux VM's in the cloud or similar?
0
This is using SuSE Enterprise Linux 11 and 12 servers. We have quite a number of SuSE servers running in production. Up to now, we are still confuse on how the memory used on each server. Take an example, I can type "free -m" and "cat /proc/meminfo", to see the figures on memory as follows. Can some one explain how the memory was used in cached, swap, page table. How about the available memory for user program? What are those "shared", "Buffers", and "cached"? Why swap does not count in the available memory especially for user program?

free -m
                       total       used       free     shared    buffers     cached
Mem:         63987      63129        858        124        423          41868
-/+ buffers/cache:      20836      43150
Swap:        16386        570          15816

cat /proc/meminfo
MemTotal:       65522980 kB
MemFree:          887160 kB
Buffers:          433744 kB
Cached:         39731232 kB
SwapCached:        33088 kB
Active:         35971000 kB
Inactive:       23661808 kB
Active(anon):   14914636 kB
Inactive(anon):   975156 kB
Active(file):   21056364 kB
Inactive(file): 22686652 kB
Unevictable:        8668 kB
Mlocked:            8668 kB
SwapTotal:      16780284 kB
SwapFree:       16195956 kB
Dirty:              2500 kB
Writeback:            40 kB
AnonPages:      15739924 kB
Mapped:           241116 kB
Shmem:            127136 kB
Slab:            3785628 kB
SReclaimable:    3100056 kB
SUnreclaim:       685572 kB
0
Actually the file descriptor table is not a real table. It's just an array of pointers to the "open file table" (struct file). But let's say we will see it as a table. What are the columns? For example:

FD   | Pointer to "open file table"
----------------------------------
...  | ...

In short, that's the question. I see a lot of different figures on the internet, but they are all different. For example, see:

http://faculty.winthrop.edu/dannellys/csci325/10_shared.htm
There they have a column "fd flags" (read/write), but I would think that this column is part of the "open file table" and not part of the "file descriptor table". See for example: http://man7.org/linux/man-pages/man2/open.2.html


       A call to open() creates a new open file description, an entry in the
       system-wide table of open files.  The open file description records
       the file offset and the file status flags (see below).  A file
       descriptor is a reference to an open file description; this reference
       is unaffected if pathname is subsequently removed or modified to
       refer to a different file.  For further details on open file
       descriptions, see NOTES.

       The argument flags must include one of the following access modes:
       O_RDONLY, O_WRONLY, or O_RDWR.  These request opening the file read-
       only, write-only, or read/write, respectively.
0
I have a Nutanix / Dell 3 node environment, I have managed to change the host Ip addresses to a new subnet and I have also change the CVM ip addresses, but I am having problems finding a way to either change the Cluster IP address from the CLI or break the cluster and rebuild with new IP and name.   Can anyone help?  I am not that conversant with Linux so a simple explanation if possible to get this done.

Many thanks

E.
0
I'm getting a new laptop in the mail this week. It comes with Windows pre-installed. I'm Windows-averse. I'm going to use some flavor of *nix as my primary OS.

Now there are certain Windows games that aren't available on Linux that my daughter wants to play. So I'll be keeping some form of Windows around, strictly for gaming purposes. My preference would be to run Windows in a VM on Ubuntu. However, I've seen mixed reviews in terms of this being feasible when it comes to gaming -- especially with modern games.

Anyone here have any success with running Windows in a VM with modern games? Or is Dual-Boot the only way to go when gaming is a concern?
1
Hi Experts,

i do have two raspberry pi, One as publisher and another one as a subscriber. It works on the local area network without internet. Data transmission and receiving, works fine and data storing into MariaDB also works fine. The issue is time. The router run locally without internet connection. If someone switch off or restart router, the system depend on router time which not synchronise online time.

To over this issue, i did add in RTC DC3231 in both raspberry with the following setup.

#!/bin/sh
# Reset the System Clock to UTC if the hardware clock from which it
# was copied by the kernel was in localtime.

dev=$1

#if [ -e /run/systemd/system ] ; then
# exit 0
#fi

if [ -e /run/udev/hwclock-set ]; then
    exit 0
fi

if [ -f /etc/default/rcS ] ; then
    . /etc/default/rcS
fi

# These defaults are user-overridable in /etc/default/hwclock
BADYEAR=no
HWCLOCKACCESS=yes
HWCLOCKPARS=
HCTOSYS_DEVICE=rtc0
if [ -f /etc/default/hwclock ] ; then
    . /etc/default/hwclock
fi

if [ yes = "$BADYEAR" ] ; then
    /sbin/hwclock --rtc=$dev --systz --badyear
    /sbin/hwclock --rtc=$dev --hctosys --badyear
else
    /sbin/hwclock --rtc=$dev --systz
    /sbin/hwclock --rtc=$dev --hctosys
fi

# Note 'touch' may not be available in initramfs
> /run/udev/hwclock-set

Open in new window


After i did this , its work on RTC time till someone reset or switch off the router. Upon router up, the raspberry pi picked up router time instead of RTC time. i have to do manually to switch to RTC time.

How i can over this, by saying just depend on RTC time only.
0

Linux

65K

Solutions

33K

Contributors

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.