Unix OS

32K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.

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

Sign up to Post

What percent use Windows versus Mac versus other?

I am curious to see the difference...

Thanks
0
Cloud Class® Course: Microsoft Azure 2017
LVL 12
Cloud Class® Course: 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.

How to test environmental logicals/variables in Unix/bash script with another Unix/bash script?  

I have below script that creates environmental logicals/variables, - those logicals/variables will be used in some other future scripts as well for efficiency reason. The purpose is to use only logicals/variables and not full directories in future scripts.  What would be another script that would test each of theses logicals/variables? Please provide an example if you can.

#!/bin/bash
export DATADIR1=/root/alldirs/2018/data1
export DATADIR2=/root/alldirs/2018/data2
export DATADIR3=/root/alldirs/2018/data3
echo "This script just stopped running"

Open in new window


Any suggestions would be appreciated!
Thank you!
0
I am attempting to suppress Last Login information being displayed for a specific user when sudo'ing a command.

I have set the attribut "DISPLAY_LAST_LOGIN" to equal 0 for that user in the userdb, however it is still showing the Last Login information.

Our OS is HP UX, realease B.11.31.

root myserver as livehost:/usr/users/myuser/scripts/test $ userdbget -u myuser
myuser DISPLAY_LAST_LOGIN=0

Open in new window


What am I missing?
0
Hi,
I have big Unix file aa.0016.s0 which I am unable to open in notepad ++ can make that file small and then open it in notepad

Thanks
0
is there way to display disk serial number using lspv in AIX 7.1 ?
0
Hi Team,

I have the below file .
ID            Name      Hours Worked      Hourly Pay
1425      Juan      18                        14.25
4321      George      22                        21.11
6781      Anne      44                        16.77
1451      Ben            36                        21.77
2277      Tuan      16                        18.77

I need help on the below comamnds on grep, Iam new to grep

I need to display the hourly pay of anne (only the last field )
using grep command.

Secondly , One line comamnd to find the id and hours worked for employees who earn more than $20 per hour.
0
We have a request from applications team to grant their non-privileged Solaris and AIX ids to be
able to execute their Shell scripts (which contains lines to run binaries) :
  sudo /gl/_ctron_/start1292
  sudo /gl/_ctron_/start1291

Q1:
Is there any way not to grant them sudo & root and yet still allow them to stop/start the services?
Or if we grant sudo, restrict them to run only those specific scripts & their sudo can't do anything else?

Q2:
Any way we can use SGID or SUID sticky bits to grant them without giving them root/sudo privileges?
0
Is there any unix script or shell script  which can fetch all the DB objects from a particular schema along with the proper extension such as (.pks, .pkb etc) to my local system.
0
Currently writing a management menu interface for managing printers on our HP UX system.

Scripts are written in Korn Shell.

The following command
lpstat -pTERRYTST

Open in new window

returns the following:-

printer TERRYTST disabled since Apr 10 08:36 -
        new printer
        fence priority : 0

Open in new window


I need to be able to search the response for keywords to identify states.

So I need to fill a variable with 1 if the printer is disabled, another variable with 1 if its new.

No idea how to complete this in Korn Shell scripting as am very new to the language.

Help! :)
0
I have a system AIX with 6.1.00 tl9 is necessary install fix for sendmail-cve-2014-3956 ?

The problem exists only if I go to the internet world?
0
Cloud Class® Course: CompTIA Cloud+
LVL 12
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

I need to extract a bunch of zip files, but I have requirements.

The zip files are scattered in various folder like this

  • base_folder/
  • base_folder/batch_1/batch_1_1.zip
  • base_folder/batch_1/batch_1_2.zip
  • base_folder/batch_2/batch_2_1.zip
  • base_folder/batch_2/batch_2_2.zip
  • base_folder/batch_2/batch_2_1.zip
  • base_folder/big_batch/batch_a/batch_a_1.zip
  • base_folder/big_batch/batch_a/batch_a_2.zip
  • base_folder/big_batch/batch_b/batch_b.zip

I want to extract the files to another folder and keep the same folder structure

  • base_folder/extracted/
  • base_folder/extracted/batch_1/file_1
  • base_folder/extracted/batch_1/file_2
  • base_folder/extracted/batch_2/file_2_1
  • base_folder/extracted/batch_2/file_2_2
  • base_folder/extracted/batch_2/file_2_1
  • base_folder/extracted/big_batch/batch_a/file_a_1
  • base_folder/extracted/big_batch/batch_a/file_a_2
  • base_folder/extracted/big_batch/batch_b/file_b

I want to extract everything in the zip file except for files that have certain extensions

  • file - OK
  • file.exe - OK
  • file.xml - OK
  • file.txt - Not OK
  • file.xls - Not OK

Is this possible with a few Unix commands? If it isn't entirely possible, what is the closest I can do?
0
tail -n5000 xyz.log

above shows last 5000 lines right


if i want to see all the 15723 lines of xyz.log what command i have to give

tail -n5000 xyz.log|grep 'ERROR WS'
how to make above case sensitive search like
tail -n5000 xyz.log|grep 'error ws'
how to make above whole word search? so that i wont see below as result ERROR aaa WS etc


please advise
0
Need to migrate DNS from old BIND box to Windows DC Server 2016.  Anyone can point to the right direction and steps required?
Also, lots of users are on Ubuntu and Macs.  Would ipconfig /flushdns work on non-windows machines to refresh that after the cutover?
Thanks in advance.
0
winscp how to grep or search on a word say "xyz" in all the folders and sub folders
Please advise
0
Anyone knows how to import txt zone file from BIND DNS into Windows DNS?
0
Prevent color change when vim is invoked.

My computer is running Windows 10 Pro 64-bit.  I connect to remote Linux Machine using telnet utility.

My shell is bash.  My terminal emulator screen has black background and white foreground.  I invoke vim <filename>.  I exit vim and return to
my terminal.  Now the terminal has changed colors.  man vim doesn't have color option that will tell me how to disable color when vim is inovked.
0
We need to upgrade the memory of one of our Unix Servers - Sun Sparc Enterprise T5120 from 8gig to 16gig.  Should we order a 16gig memory and replace the current 8gig?  
Is there any command to get the memory model  in the server?  Please advise.
0
I have version IBM WebShere MQ 6.0.2.3 , do I need to upgrade the system from AIX 6.1.9 to the AIX 7.1.4 now  the current version of QM is compatible?
0
winscp how to name the link i save to favorite

say i have link
/home/xyz/bea/logs

i want to save above link with name as production_logs_folder

I have other link as below

/home/xyz/crm/logs

i want to save above link with name as crm_logs_folder

how do i name like above so that it is easy to locate and navigate later
\please advise
0
Cloud Class® Course: Certified Penetration Testing
LVL 12
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

A single-line shell command like this:
find [path] [filename pattern] -exec gzip {} \;

sometimes succeeds, and sometimes returns:
find: '[path][file_name]' No such file or directory.

How is that possible?  If the file really doesn't exist, I expect "find" to quietly do nothing.  But if it really does exists (as it does) how can bash return: "No such file or directory" and then print the exact path and file name that it claims it can't find?

We run this shell command nightly as a "host" job in OEM (Oracle Enterprise Manager) job queue on our Oracle database servers, because our management requires us to use this job scheduler, not cron or some other job scheduler.  This job always succeeds on two of the three servers we run it on, but it fails some nights, not always, on the third server.  These three servers are unrelated to each other, and have nothing in common other than they all run independent Oracle databases.

We have: Oracle Linux Server release 7.4
kernel: 4.1.12-112.14.15.el7uek.x86_64
0
log file how to copy whole content

zgrep -C20 '1234' 1234.log.gz

above gave lot of results in unix screen

how to copy whole page and paste into a text file on my C drive of the windows laptop through which i am connecting to unix box using putty?


also

i see all results like

0123456
9123488

etc

which i do not want

i want complete word search of 1234 only
how to achieve it
please advise
0
How to create a md (memory disk) file in freeBSD,

basically I want to keep / ( root ) in memory and hence I want to use memory disk ( md ). Also I want to ensure that it's like that boot over boot
0
When do we need to add lun information in sd.conf ? how to identify wether HBA card is oracle branded or emulex ? What driver should be loaded into solaris 8 kernel for Emulex card ?

Recently, it took about 3-4 hours to perform re-configuration reboot post edition to sd.conf ...... how can we avoid this late booting cause , sd.conf was edited with 255 lines like :

Below contents are only indicative ***

name= x target=0 lun=0
.
.
xxxxxxx target=0 lun=255

How do i know which target the luns are coming on to  ? so i can mention them coorectly
0
i have install postfix on ubuntu 16.04 for send-only mail.
when i send mail nothing happend nor error and  don't send mail.
service status on postfix  is
fatal: bad numerical configuration: mailbox_size_limit = 20M
fatal: bad numerical configuration: mailbox_size_limit = 20M
warning: process /usr/lib/postfix/sbin/local pid 12388 exit status 1
warning: /usr/lib/postfix/sbin/local: bad command startup -- throttling

what is wrong here what should linit be?
0
Hi,

I have to upgrade an AIX 6.1.9 to an AIX 7.2, I have installed a PowerHA 6.1, this version is compatible with the 7.2?
0

Unix OS

32K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.