Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

learn more… | top users | synonyms

0
votes
1answer
49 views

Executing Perl command from shell script not resulting into anything

I am trying to execute the below command from a shell script: perl -pi -e 's/Ç/|/g' diff_new_old.dat This command gets executed without any errors, but the execution doesn't do the intended ...
0
votes
2answers
181 views

Call URL from console without opening in any browser

I have a browser controllable smart pluck outlet, which I can control by calling a URL. I know I am aware of the command open http://192.168.1.175/cgi-bin/relay.cgi?off But that opens a tab in the ...
0
votes
1answer
152 views

bash command in python not working

I would like to run a bash command from python. My code: process = subprocess.Popen(('ifconfig -s'), stdout=subprocess.PIPE, shell=True) output = process.communicate()[0] lcd.message(output) sleep(2) ...
1
vote
1answer
35 views

How do I install programming info pages in Mac OS X?

I used to have a Linux system i was able to type info libc to view info pages on the C library, including unix functions. However, now I am running Mac OS X this does not work. How do I install the ...
2
votes
1answer
475 views

dyld: Library not loaded: /usr/lib/libcurl.4.dylib curl SSL error

I'm not sure what happened to my system but I am having an issue with dyld/curl, affecting my overall computer performance. I am on Yosemite. I have a feeling it's the Conda openssl. How do I just ...
0
votes
2answers
50 views

How to allow a user to view a particular file via sudoers?

In Linux, I want to allow a normal user to view only one file in a path. How to give the entry in sudoers file. Is the below one is correct? user ALL = /bin/cat
1
vote
1answer
21 views

rsync ignoring partition directory

I use rsync to clone my internal hdd to an external disk. My system is Arch Linux. I have two partitions: / /data I am using the following rsync command: rsync -avzxt --progress --delete ...
3
votes
2answers
62 views

How to tell of a GZip file is still being written while being copied

I am getting a gzip file in a path. Input Folder Path: <server>/input_gate I want to check whether the GZIP file I am getting in this folder are valid? I have used the following command. It ...
1
vote
1answer
31 views

Follow current window in screen -x

Using screen -x (after connecting over ssh) from a second computer is a great way to follow what someone is doing in a terminal. However, if the first person changes the screen window (C-a p or C-a ...
1
vote
1answer
201 views

Unix/Java process stops running when moved to background

We have a Java process that was created using Appassembler. It runs fine as long as it is started and run in the foreground: [ec2-user@ip-xxx ourapp-0.0.1-SNAPSHOT]$ bin/ourapp Starting in ...
1
vote
1answer
46 views

Go to directory of symlink file target

How can I create a command (or alias) to go to the directory which contains the target file of a symlink. For example, if I have a symlink symFile@ -> /Users/zhermes/some/dir/someFile I'd like ...
1
vote
1answer
73 views

SSH working but SCP permission denied using the same password

I can successfully SSH into my remote sever (amazon web services if that matters, I'm on a mac) using ssh -i mykey.pem ubuntu@??.??.??.??? But when I try to use scp scp -i test.php mykey.pem ...
0
votes
1answer
26 views

Detect IPC between running processes on Unix

Suppose I have 2 processes on any unix-based system and I sure they are using some inter-process communication. How can I detect what do they use in order to simulate or hook it? I mean pipes, for ...
1
vote
1answer
146 views

Why tar hangs failing to extract a file

I am using a Solaris 11 system and am trying to extract from a tar file which I know to be OK, but when I try to extract it, tar hangs. I don't get any feedback from tar. What areas of Solaris should ...
0
votes
1answer
214 views

Missing MySQL extension required to run WordPress on custom Linux server

I need to get WordPress up on running on a custom Red Hat Linux server, but am getting the following error when attempting to visit the WordPress install page: Your PHP installation appears to be ...
0
votes
4answers
155 views

How do I DELETE a comma and a space from a numeric string using a bash script

Folks, I have asked this question 5 times on here and have received 5 separate bits of code from super users that have all *failed. Problem: I have stock information being brought back into a txt ...
0
votes
2answers
65 views

Downloading large amount of files from unix server

there are about 7000000 files in a single directory summing up to a total of 650 GB. (listing them alone is not even possible) what options do i have to download these? i was thinking of using tar ...
1
vote
1answer
92 views

Using cURL command-line tool on Mac, What can I do to this script to ask it to fetch stock data which will replace commas with NO SPACES

Example: Google Outstanding Shares are 670,000,000 and this value is collected in a txt file from Yahoo Finance API via the below script. The issue is; that numbers WITH commas or spaces are a bloody ...
0
votes
1answer
181 views

Linux bash command to list hidden files first, then other files sorted by extension

This page: How can I make "ls" show dotfiles first? lets me list hidden files first, but I also wish to sort non-hidden files by "extension" e.g. all filenames ending with ".png" come after ...
0
votes
1answer
59 views

How can I write a script to kill process that runs for a few hours?

I run python script from cron every hour on CentOS 5 and see some processes keep running for a few hours I would like to run a script every few hours to kill those processes. How can I write the ...
0
votes
1answer
65 views

“ls -la | sort +0nr -2 +2d” , what does sort do here?

I hae seen this somewhere written: ls -la | sort +0nr -2 +2d What is sort doing here? What are these arguments.
0
votes
2answers
131 views

Unable to get accurate record count of a csv file

I have a .csv file that has some values formatted as paragraphs with line breaks or sometimes bullet points. "STAT","ID","DESC" "UPD", "1", "Updated" "CHG", "2", "Changed" "UPD", "3", "Updated. ...
0
votes
0answers
48 views

remove group by gid ubuntu

When I open a shell I get the following: groups: cannot find name for group ID 10065 id prints: uid=xxxx(user),27(sudo),105(fuse),10004(pr_SDIS1),1006 How do I remove this group?
0
votes
1answer
26 views

How to fetch the string “Hi there” from the below array in unix

I only want to fetch Hi there and store it in a variable VAR1. So basically VAR1 should contain Hi there VIEW_COL[1]="Hi there,USA,Y" This is what i have tried so far. Column_Display_Name=`echo ...
0
votes
2answers
104 views

Find availble disk space in unix without parsing `df` output

When I type df -k ., I get the following output Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 16512936 8650196 7023932 56% / What I do is tail the last line and ...
0
votes
2answers
194 views

Why does sudo fork before executing the process?

This question may seem a bit silly, but since in Unix-based systems, replacing an executable's image is done in a single step, replacing the currently running process, in the function call execve (and ...
0
votes
1answer
287 views

How to set up a working ssh server on Windows 7 that accepts public keys

What I actually wants it to make it possible to use rsync from an Unix server to backup files on a Windows 7 Ultimate computer. It need to use public keys unattended and I want Unix-style directory ...
125
votes
5answers
11k views

How does Linux know that the new password is similar to the previous one?

A few times I tried to change a user password on various Linux machines and when the new password was similar to the old one, the OS complained that they were too similar. I always wondered, how does ...
1
vote
2answers
49 views

Why doesn't this Linux symlink work?

I'm trying to create a symbolic link for the file logs inside home/dir1/ to the file netlogs inside home/dir3/. The link is created but when I try to look at the contents of netlogs I got this error ...
0
votes
2answers
37 views

What's the smartest way to copy-rename (backup) several files in different folders at once in the shell?

I want to copy-backup several files in different folder at once before updating ntpd. Example (one file only): sudo cp /usr/sbin/ntpd /usr/sbin/ntpd.old Files: /usr/bin/sntp /usr/bin/ntp-keygen ...
0
votes
2answers
150 views

find /data/oozie-admi/ -type d -ctime +1 | xargs rm -rf [0] command deleted /data/oozie-admi/ folder

/data/oozie-admi/ folder contains multiple directories. This command find /data/oozie-admi/ -type d -ctime +1 | xargs rm -rf [0] deleted /data/oozie-admi/ folder . Need to find out scenarios in ...
3
votes
1answer
148 views

How to collapse all trees in htop?

I would like to be able to collapse all the trees in the default view of htop. Is there a way to achieve that at once, instead of selecting every tree and hitting F6?
1
vote
2answers
122 views

Nmap runs slower as root than normal user

I am working on a bash script to enable automatic detection and remote control of my company's proprietary data recorders. The recorders run a custom version of linux and are essentially powerful pis ...
0
votes
1answer
34 views

from which file grep found match

when doing something like this: cat *.* | grep mystring is it possible to know from which file each match comes from? If not what would be the alternative?
0
votes
0answers
48 views

Can conky escape its variables as proper JSON?

This might be a better fit for the unix exchange, but I figure a lot of people here will be knowledgeable about conky. While trying to use conky output for use with i3bar, I've found that it will ...
0
votes
0answers
38 views

Is it possible to modify .bash_logout?

I am trying to modify .bash_logout to append the shell history to a txt file. I am also trying to figure to make some restrictions on that file. I have tried a bunch of commands while searching about ...
1
vote
1answer
45 views

How can I mount NFS file in unix?

I am using Cent OS 5.6 and I have two VMs. I am trying to mount a file but unable to do so. Here's what I have done. Mkdir/uxadm Chmod 777 /uxadm vi /etc/exports /uxadm ...
1
vote
1answer
32 views

Find the creator of an idle TCP connection

On Solaris (or Unix), how can I find the remote host associated with the creation of a currently idle TCP connection? lsof gives me a bunch of lines like this: java 25375 foo 8161u IPv4 ...
1
vote
2answers
240 views

How to append data in a file by dd?

I want to append new data in a file stored in SSD. dd if=/dev/shm/test of=/data/sdb/test bs=1G oflag=append But df -h shows the dd command always overwrite the test file, instead appends new data ...
1
vote
2answers
171 views

ffmpeg: disable one of a several audio streams

I've got an video file with two audiostreams: Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 960x540, 58 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc Metadata: ...
0
votes
3answers
267 views

Unix Command to grep a time range

I have a log file, saved with particular date. I wanna fetch log entries during a particular time and date range to another file. Ex: all entries from 2014-12-04 00:00:00 time to 2014-12-04 17:00:00 ...
0
votes
1answer
29 views

rename only the last directory in the tree

The below command in unix will rename all the directory with the name Utility to Claim, when executed from the top level find . -type d -name Utility -exec sh -c 'mv "${0}" "${0%/Utility}/Claim"' {} ...
1
vote
2answers
98 views

Why redirecting FINDSTR output produce UNIX line ending?

When I issue this command: FINDSTR /I /N "<sdk:extra>" addon.xml output is: 973: <sdk:extra> 995: <sdk:extra> 1017: <sdk:extra> 1036: <sdk:extra> 1057: ...
-2
votes
2answers
52 views

How can I create a script in Unix with following requirements? [closed]

A script named /root/backup.sh on w01 that will backup the contents of /home The script will: Create a tar archive named /share/<YYYY><MM><DD>_w01.tar where YYYY represents the ...
1
vote
1answer
19 views

Unable to remove a directory

I'm using SUSE and I'm trying to delete an empty directory When I use ls -la it shows that that it contains .fuse_hidden0000001700000010 with rw for owner (that's me not root). I cannot delete this ...
0
votes
0answers
14 views

Mac OS Yosemite popd: How do you keep the dir in the stack and cd to that dir at the same time?

As the document of popd says, using "-n" will keep the dir in dir stack, but on OS X Yosemite, when the dir stack is like this: 0 ~/0 1 ~/1 2 ~/2 3 ~/3 and if I use popd +2 -n The working ...
0
votes
1answer
171 views

How to correctly mount a tmpfs?

Excerpted from the documentation So 'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs' will give you tmpfs instance on /mytmpfs which can allocate 10GB RAM/SWAP in 10240 inodes ...
0
votes
2answers
157 views

Replace random string using sed

How do I replace random strings using sed. For example if I have a text file like this: EF125353.1 to be replaced 1 EF125353.1 to be replaced again 2 EF125353.1 to be replaced etc etc 3 ...
0
votes
0answers
358 views

Batch file unable to run commands after launching putty

I am writing a batch file abc.bat which is used to launch putty. I want the .bat file to go to a particular folder (in PuTTY), source it in csh and go to a particular path on that server. I wrote the ...
0
votes
0answers
24 views

/usr/local and /usr/share detailed explanation

I am afraid this is another of FHS questions but I was not able to find more detailed explanation which I feel I need. Yeah, I know about Uni FHS and etc, but what still feels like lacking ...