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

1
vote
1answer
159 views

Why is process not being displayed by TOP

I am running a Mathematica script (this question probably doesn't fit in Mathematica.SE however) and I know that it generally takes up a lot of RAM and loads up my cores. However, althought pgrep ...
0
votes
0answers
85 views

ArchLinux can't install perl-wx

I am trying to install perl-wx from the AUR Repo with yaourt, but can't get it to work. I have tried "export LC_ALL=C". Still an error occurred during the check. Maybe you can help me? Pastebin: ...
1
vote
1answer
26 views

fstab nouser - device still mounted

Please correct me if my understanding is wrong. The nouser option forbids an ordinary (i.e., non-root) user to mount the filesystem. This is the default. In my /etc/fstab, I have: ...
8
votes
5answers
37k views

how to use netstat to show what process is listening on a port

I'm on an OS X mountain lion laptop and have a couple of Vagrant boxes on it. I'm trying to figure out which process is listening on port 8080. My variations produce like a hundred lines but none with ...
11
votes
3answers
7k views

Opposite of tail: all lines except the last n lines

How can I discard the last n lines of a file with a unix command line filter? That would be sort of the opposite of tail: tail discards the first n lines but pipes the rest through, but I want the ...
0
votes
1answer
59 views

How to mount a encrypted tar file in Linux?

Let us imagine I have encrypted my tar file with gpg as we can see here but I want to mount that with archivemount (e.g.: answer) without holding the unencrypted file on disk. Is it possible? If not, ...
1
vote
3answers
876 views

Edit xml file using shell script / command

I need to do this using unix script or command There is a xml file in /home/user/app/xmlfiles like <book> <fiction type='a'> <author type=''></author> ...
2
votes
1answer
1k views

mailx read attachments

Arch Linux x86 Heirloom mailx From what I know, the mailx utility is supposed to read and send email. I somehow got it to work with sending and receiving mail with a gmail account, also using ...
0
votes
0answers
19 views

Stopping a process when a given file is accessed

I have a complex script that accesses/creates lots of files, and I'm trying to track down exactly when it creates a file with a given name. What I want is to be able to stop (e.g. as if using Ctrl+Z, ...
1
vote
4answers
62 views

what is the unix equivalent to windows command route add

I need to run the command route add -p 123.45.67.8 mask 255.255.255.0 208.00.000.000 on a linux server. what is the unix equivalent?
0
votes
4answers
18k views

Copy from remote server to my laptop via ssh

I am on centos server (via SSH) and I don't want to open file manager to copy dump file. What comand whould I use (scp or what) to copy that file from remote server directly to my comp. like cp ...
2
votes
1answer
86 views

Append text to first occurrence of a pattern using sed

Say there is a text file as below: Hello world types="" Mario types="Game" What I want to do is find the first occurrence of type="" and append with word "program". I need output as: Hello world ...
1
vote
1answer
32 views

How to set Permissions and Owner/Group to be used for file creation?

Legend: Owner/Group e.g. AccountUser/Nobody On a web server (apache), I have a folder (chmod 775, AccountUser/Nobody) which I move uploaded files into. A web-based script running as Nobody is used ...
0
votes
1answer
113 views

Remove last column values in field seperated file using unix shell script

The files is seperated by | pipe symbol myfile.txt Hello|how|are|you|hope|you|are|doing|fine Lilly|jasmine|rose|sunflower|nightfire|flowers I want to remove columns greater than 3. I want result ...
3
votes
1answer
44 views

Can't run default shell

What to do if I uninstalled my default shell (/opt/local/bin/bash)? I can't open terminal under my account unless my default shell is valid or at least exists. Are there any elegant ways to fix it? ...
0
votes
0answers
42 views

In Unix, delete a file listed in the directory but missing from the filesystem

I, like an idiot, killed my rm -rf command in the middle of it, and now there's one file remaining, but it keeps saying access is denied. I assumed it was because a process was accessing it, but when ...
1
vote
1answer
35 views

Why can't I use my newly created user with chown?

So I am attempting to create a new user and group, and then change ownership of a directory to that new user/group. However, when I do, chown comes back with an "illegal user name" message. Here's a ...
1
vote
1answer
59 views

Generating SSH and GnuPG keys on a remote server. Key management best practices

I'm asking about best practices relating to key generation, use, and management. On a few occasions, and for various reasons, I've created SSH and GnuPG keys while logged in over SSH to a remote ...
0
votes
1answer
42 views

How can I remove a file whose filename has weird characters? [duplicate]

[root@host dir1]# ls -lrt total 412 -rw-r--r-- 1 root root 13747 Jun 3 16:01 -lang?[5~?[5~?[5~?[5~?:q! We tried different ways and they don't work. [root@host dir1]# ls -lrt | tail -1 | awk ...
2
votes
2answers
3k 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
0answers
43 views

Can't login on server using ssh [Too many authentication failures]

I'm not able to login in the server. I keep getting this error: Received disconnect from 128.238.182.77: 2: Too many authentication failures for bmpasini It happened to me before and I solved by ...
46
votes
3answers
8k views

What does the 'rc' in `.bashrc`, etc. mean?

Well, this is embarrassing. I feel like I just realised I don't know a loyal colleague's name after working with them for 10 years. "Hey, er... *cough!*, thanks for that great job you did on setting ...
0
votes
2answers
37 views

In Linux, how can I run a process that I can come back to later to give a command after detaching

I'm currently developing a server hosting app (mainly for myself / learning purposes) and everything works great and what not, I don't know how many of you are familiar with Counter-Strike in general, ...
2
votes
3answers
2k views

Is it possible to get user's input during installation of rpm?

Is it possible to get input from a user during an rpm installation? I have a script that works by itself (taking input from a user and doing actions) but when run as part of the post install of an rpm ...
1
vote
0answers
30 views

at sends a BCC to an address that doesn't exist

I'm running some pretty long tasks at work and I want to be warned when they finish, wherever I am, so I use at -m with sSMTP to get a notification on my Gmail address. It's my first time playing ...
6
votes
4answers
4k views

How do I run this `find` command, but only on non-binary files?

I want to remove trailing whitespace from all the files in a recursive directory hierarchy. I use this: find * -type f -exec sed 's/[ \t]*$//' -i {} \; This works, but will also remove trailing ...
34
votes
13answers
26k views

Is there a way to display a countdown or stopwatch timer in a terminal?

How can I display a real-time countdown timer on the Linux terminal? Is there an existing app or, even better, a one liner to do this?
6
votes
5answers
9k views

How to grep for special character NUL (^@^@^@)

File: O000000667520994000000074720121112000000N^@^@^@ I used the below command but it doesn't work. grep "^@^@^@" *
0
votes
1answer
105 views

Recommended permissions for /home

What is a recommended setup for /home permissions? I know about user / group / other, about sgid flag and I know what User Private Groups are. I have read the comment about adduser no longer setting ...
1
vote
3answers
60 views

Check if any two files in a directory are identical?

I'm working on OSX and I have multiple CSV files in a directory. I want to check if any two of them are identical. I've tried: cmp file1.csv file2.csv || echo "files are different" This tells me ...
13
votes
3answers
46k views

Copy Folders from one Unix server to another?

I would like to copy a folder from one Unix server to another Unix server. Can anyone tell me if there is a method or command to to achieve this?
0
votes
0answers
42 views

more recent build of GNU coreutils for win32?

Is there a more recent build of unxutils.zip? (The unix command-line utilities for Windows) The canonical downloads are at http://unxutils.sourceforge.net/ but they date from 1999-2003; in particular ...
6
votes
5answers
98k views

How to run a command file in PuTTY using automatic login in a command prompt?

I am using the following to login automatically to a remote server and then run commands listed in a commands.txt, like this: C:\path\to\putty.exe -load "[Sessionname]" -l [user] -pw [password] -m ...
5
votes
1answer
3k 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 ...
5
votes
3answers
6k views

BASH - merge directories when using mv

I just started using BASH, so I can move all contents of a directory to another. But the issue is, I was expecting it to merge the directories. I am using cron job to run this script. #!/bin/bash ...
0
votes
1answer
55 views

Find UID of user via SAMBA [closed]

Is there a way to retrieve the UID of a user via a SAMBA share? I can get the user list with: rpcclient -W 'WORKGROUP' -c querydispinfo -U''%'' '192.168.21.129' 2>&1 index: 0xa RID: 0x4c0 ...
3
votes
3answers
491 views

Mac- or Unix-compatible utility to compute and compare LAME MusicCRC in MP3s?

The LAME encoder stores a CRC16 checksum of the audio stream in the header of every MP3 it encodes. The 'actual' audio checksum can then be computed and compared to the original value at a later date ...
0
votes
1answer
37 views

Matching () with a Unix/Linux regex

I have a couple files with the name (a).1 (a).2 ... (a).100 Since a lot of processing tools don't really like ( and ) in the filename I thought it best to rename them to a different name. I googled ...
0
votes
0answers
47 views

x11 forwarding from windows to unix

i am trying to launch some GUI to a UNIX server from my win7 laptop. I have installed XMing Server (as also its fonts and XLaunch) and i am using a putty in order to launch an SSH session from my ...
0
votes
1answer
13 views

How can i detect if the virtual CD ROM is attached or detached?

I have a requirement where i need to check if a virtual CD ROM is attached if yes then read the values and apply it on to the application. But couldn't find a way to detect if a CD ROM is attached or ...
6
votes
4answers
6k views

What are the advantages of symlinks over hard links and viceversa?

I understand the differences between symbolic and hard links, but I've never understood why choose one or the other.
0
votes
2answers
66 views

Unix/linux shell scripting floating point division

I have to divide two floating point values and store it in variable. My code below v_missedvol=4003.03 v_allvolume=3003.03 v_vol_temp= $(echo "$v_missedvol / $v_allvolume" | bc -l ) the result ...
3
votes
4answers
2k views

Get md5sum without file name?

I need to get the md5 sum of a file on AIX, but the md5sum program prints the sum followed by the name of the file. How can I get the sum without the file name.
2
votes
1answer
207 views

Why can't “sudo cp” find the files?

Who can give me a logical explanation to this issue: I can not run this command: sudo cp /data/*20150522* /backup/ cp: cannot stat `/data/*20150522*': No such file or directory And when i switch ...
0
votes
1answer
40 views

How to Identify which person with root access has killed a job/process from a pool

I was curious to know if there are 3 or 4 people who has root access to a node. one of the person has initiated a job for running, But some one has killed the job that was running. what would be the ...
2
votes
1answer
137 views

AIX - how to change user shell to bash?

I want to know how I can run bash automatically when I log into my AIX server. How can I do that without having to type bash every time I log into my AIX server?
1
vote
0answers
43 views

Delay packets sent through a given TCP port

What is the best way to purposely delay packets (by 10 seconds for example) uploaded to a given TCP port (e.g. 1935) on the RTMP protocol? The approach must work on Mac OSx Yosemite. I have tried ...
1
vote
2answers
544 views

Unix Script: Wait until a file exists

I need a script that will wait for a (examplefile.txt) to appear in the /tmp directory and once it's found to stop the program, otherwise to sleep the file until it's located So far I have: if [ ! ...
9
votes
6answers
8k views

bash execution time in milliseconds (mac osx user)

I've checked this , but the solution provided did not work for me. Using date I can get the execution time in seconds: T="$(date +%s)" #some work here T="$(($(date +%s)-T))" echo "execution time ...
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 ...