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
0answers
2 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?
1
vote
0answers
8 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 ...
7
votes
3answers
19k views

How to display Unix time in the timestamp format?

I'm looking for a way to display my time in Debian Linux as a timestamp, e.g. 1279628325 I can't find any options to do that with the date command. Any ideas?
-1
votes
0answers
9 views

Zsh prompt function

why it's doesn't work? setopt prompt_subst autoload -U colors && colors git_prompt() { temp=`git symbolic-ref HEAD 2>/dev/null | cut -d / -f 3` if [ "$temp" != "" ]; then ...
1
vote
1answer
27 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 ...
0
votes
1answer
359 views

Unix: copy files sequentially

As far as I remeber, long time ago I've been using such a thing: in total commander I pressed F2 in copy dialoge - added "copy task" into a "Copy queue". And so, all those files have been copied ...
0
votes
1answer
13 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
13 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 ...
42
votes
11answers
8k views

What is the relationship between Unix, Linux, Ubuntu, Debian and Android?

What is the relationship between Unix, Linux, Ubuntu, and Debian? I suspect they are all Operating Systems that are based upon one another - similar to how Windows is based on DOS. Is my suspicion ...
0
votes
1answer
57 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 ...
5
votes
5answers
5k views

individual cpu % in 'top' output

Usually to view individual cpu % we press '1' in the interactive mode of top. However I am not able to figure out the logic to get the same output in batch mode i.e, top -n1b I am redirecting this ...
5
votes
3answers
303 views

Unix/Linux program that can handle all popular compression/archiving formats (e.g.tar, gzip, bzip2, zip)?

I sometimes get confused by the varying command line options I need to run common Unix archiving and compression software (e.g. gzip, bzip2, zip, tar). Is there a program out there that can just Do ...
39
votes
10answers
26k views

Unix: ls, how to sort first directories then files etc

I would like to use ls command to first show direcotries and then files. I tried ls -la | sort -k 1 But I got a wrong order.
0
votes
0answers
10 views

Users migration from UNIX to NIS [migrated]

I just set up a NIS server and I have 8 clients machines. Each of these machines was used by some users before setting up NIS. I want to migrate their account to the NIS server. The problem is that ...
0
votes
1answer
17 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 ...
2
votes
1answer
657 views

Unix command for recursively copying files

I need a unix command for the following: Directory Structure /project /images /products /cup.jpg /laptop.jpg /designs /alpha.jpg ...
3
votes
1answer
3k views

Need to copy a file from unix box to windows folder using pscp command

I have a unix svr A: username: uname password: pwd then there are some files under /usr/local/jboss/configuration which are accessible only when a 'sudo su' command is performed. (and the username ...
3
votes
1answer
2k views

How do I move a linked file on Unix?

I have a bunch of files in one directory and links to each one of those files in another directory. So ls -l looks something like this: lrwxrwxrwx 1 rembol rembol 89 Jan 25 10:00 copyright.txt ...
0
votes
2answers
4k views

How to move files to hdfs in hadoop using unix command

I have 2 directories "dft" and "hdfs" in the unpacked Hadoop folder. I am trying to copy the file(StartUnit.txt) in dft into hdfs. The corresponding command and exception are as shown below ...
1
vote
1answer
16 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
4answers
69 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
1answer
27 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 ...
52
votes
4answers
70k views

What is the “wheel” user in OS X?

I recently reinstalled iTunes and I noticed something peculiar. The "original" version of iTunes has a user in the permissions known as "wheel" that is set to "Read Only". I dragged this version of ...
0
votes
2answers
60 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
27 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
36 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
26 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
2answers
41 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
1answer
32 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
1answer
248 views

Recover original timestamp after command line copy

Is it possible to recover the original time stamp (date added, date modified) of files after copying them (command line, cp -r folder) The original files are gone.
0
votes
1answer
24 views

Copy a file with current date stamp to another location-Shell script [closed]

I have some log files creates in a location like this format. 2015_01_07.stderrout.log 2015_01_08.stderrout.log 2015_01_09.stderrout.log 2015_01_10.stderrout.log (one file is created per day with ...
1
vote
1answer
19 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 ...
0
votes
1answer
3k views

ksh Auto-Completion PuTTY Configuration

I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns ...
7
votes
3answers
5k views

What is the fastest and most reliable way to split a 50GB binary file into chunks of 5GB or less, and then reassemble it later?

Our servers are running Ubuntu Linux, and the binary file is a BSON dump of a large MongoDB collection. How reliable is a tool like split? Is there a faster or better way to do this?
4
votes
1answer
3k views

Copying from one file to another using nano editor

How do I copy a few lines from one file to another file using the nano editor?
39
votes
2answers
11k views

How to start vim without executing /etc/vimrc?

On my Linux server at work, the admins did not install cscope, and I installed it from source in my home directory and added it to the $PATH. The trouble is, the /etc/vimrc has a reference to ...
4
votes
1answer
2k views

How can I configure Mutt to work properly in Cygwin?

Every time I try to run Mutt in cygwin I get the following errors: Error in /home/JJR/.muttrc, line 4: smtp_url: unknown variable Error in /home/JJR/.muttrc, line 5: smtp_pass: unknown variable ...
0
votes
1answer
19 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 ...
2
votes
1answer
2k views

time stamp XXXX s in the future issue - touch command (Linux)

When I untar a tar.gz file on Debian Lenny, I get the such outputs: tar: openssl-1.0.1e/apps/openssl.cnf: time stamp 2013-02-11 15:26:04 is 1360584537.139999998 s in the future ...
1
vote
3answers
2k views

Loop through a directory unix shell programming

Use a for loop to go through the filenames in the directory. In this version, only loop through the filenames that do not have a ".old" extension Inside the loop, rename the file to the new name.
0
votes
2answers
48 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 ...
1
vote
1answer
31 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 ...
0
votes
2answers
33 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 ...
6
votes
5answers
747 views

Is there any functional-like unix shell?

I'm (really) newbie to functional programming (in fact only had contact with it using python) but seems to be a good approach for some list-intensive tasks in a shell environment. I'd love to do ...
2
votes
2answers
209 views

#! (shebang) line length limitation

In connection with developing GNU Parallel I seem to have hit a limit in the length of #! (shebang). This shebang-line: #!/bin/echo ...
0
votes
1answer
6k views

Setting timezone in AIX

The timezone is set to "CET" but date displays CEST $ echo TZ CET $ date Tue Apr 16 15:56:57 CEST 2013 Noticed the timezone on another similar system is "CET0" (not sure what the 0 means here!). ...
47
votes
4answers
15k views

less is more? Is more less? I'm so confused

When I first heard their names, I got really confused when I tried to guess what these tools might do, I thought I'd misheard something. What's the difference between more and less, i.e. why ...
119
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 ...
13
votes
4answers
8k views

How can I recursively grep particular files in a directory?

I'm new to linux and grep, and trying to find my way around. By using find -name *.java I am able to find the names of all of the java files in a particular directory. Suppose I want to count the ...
1
vote
2answers
45 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 ...