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
2answers
12k 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
votes
2answers
314 views

cut: |: No such file or directory

while read line do echo $line calendar_date=$(cut -d\ -f1 $line) hr_of_day=$(cut -d\ -f2 $line) echo ...
1
vote
2answers
15k views

scp error: “Permission denied (publickey). lost connection”

I tried to scp an svn dump to savannah, but I got the following error at the end. Permission denied (publickey). lost connection The scp command and verbose output are below. Any ideas? ...
1
vote
0answers
25 views

How to resolve Seagate USB 3.0 hard drive not being properly recognized by FreeBSD 10.3?

FreeBSD version: 10.3 Seagate drive model: SRD00F1 USB 3.0 Adapter: Insignia USB 3.0 PCIe Host Card (NS-PCCUP53) When I reboot with the drive already attached, it is not seen. But, when I attach the ...
0
votes
0answers
5 views

Processes duplication and Denial of Service

Suppose a person X connects to a Unix OS with ssh as a regular user; X writes a small program P which executes itself 2 times without waiting and exits; then X executes it. Clearly, after some time, ...
1
vote
3answers
22 views

Grep by all filenames in a directory

I want to get the process status for all services running in a given directory. Right now I can check one by one ps -ef | grep ServiceName. But is there a way to ls the directory and ps every service? ...
7
votes
4answers
4k views

Why should the size of the swap partition be double of the RAM size?

Why is it recommended that the swap partition size be double that of the RAM size? Specifically, why would I need to store data stored in the RAM twice??
0
votes
0answers
14 views

Converting unix cli command to windows

I am using gethttpsforfree.com to get my cert. I am stuck on step 3. They want me to run a command but it's a unix command and I am on windows. The command is PRIV_KEY=./account.key; echo -n ...
0
votes
2answers
34 views

Shell Script output indentation

I want to call a shell-script / application inside another script. Every line of the contained script should be indented by 2 spaces. Is this possible? The output should look something like this. ...
16
votes
7answers
16k views

.tar files without directory structure

I'm .taring some files with the path example/super_user/Output.*. The resulting .tar looks like this: + example + super_user - Output.zip - Output.xml - Output.txt ...
53
votes
11answers
29k views

How can I trigger a notification when a job/process ends?

The place I work at has commands that take a long time to execute. Is there a command/utility that I can use to notify me when the command execution is over? It could be a popup window or maybe a ...
1
vote
1answer
16 views

Diskstation (Networkshare) - Deleted File but Space still in Use

So I've been trying to clear up some space on my backup drive. The Volume is 17TB in Size but it's in use by 96%. Now, I deleted a 2.5TB File but the usage isn't going down. I've went ahead and ...
1
vote
3answers
17k views

Connecting to FTP via the Linux command line

I need to upload files via FTP from the command line. I have this information: a URL, a username, a password, a port, and the fact that I am supposed to use passive mode. How do I upload a file given ...
0
votes
0answers
27 views

How can I make git bash `which` command work with windows?

If I type which node in git bash in Windows, then I get node's path, but when I type which open, it says it's not found. The open program is in PATH, but not marked as executable since chmod +x ...
-1
votes
0answers
14 views

How to disable *all* HTTP methods on Apache [2.2.29 (Unix)]

My web server responds to junk HTTP methods through telnet and I would like to prevent this. I initially used the code bellow to prevent TRACE,TRACK and DEBUG in my .htaccess file: RewriteCond ...
0
votes
1answer
381 views

How to remove mac extended attributes from a file?

I have the following special attributes on my pdf file: -rw-r--r--@ 1 Barnabas staff 18227 Oct 9 11:34 myfile.pdf com.apple.metadata:kMDItemWhereFroms 331 ...
3
votes
1answer
50 views

How to check if make uninstall will work

FYI I'm on Mac OS X El Capitan. I compile things using CMake and make on my machine on a day to day basis, but without so far having understood CMake or make in any respectable depth at all (I have ...
116
votes
5answers
274k views

How can I make chown work recursively?

I've got a directory called pdfs that contains a bunch of sub- and sub-sub-directories. I want to change ownership on all PDF files in all of the subfolders. I just tried this: chown -R ...
2
votes
2answers
2k views

Configure a UNIX server to send its logs to a remote syslog server?

Is it possible? If so, how is it done exactly? The syslog.conf file doesn't help too much.
7
votes
5answers
12k views

Stuck choosing between ext4 and ext3 for the file system

I was in the process of installing Ubuntu 11.10, but got stuck choosing which file system to use. ext3 and ext4; which is better for a personal desktop? If ext4 is better, will it work well on my ...
0
votes
1answer
54 views

arithmetic operation on a nested column in a tab delimited file

I have a tab-delimited text file containing Column1...Columnn columns and R1 to Rn rows. Within some of the columns, there are multiple nested fields with an identifier and then separated by semicolon ...
0
votes
1answer
28 views

Modify value on XML file on Unix

i need to do something with Xml file on Unix. In particular in 1 path i have different xml files. I need to cut the first 10 digits for value tradeId tag and then paste it to issue tags <issuer ...
223
votes
8answers
236k views

What is the “You have new mail” message in Linux/UNIX?

Sometimes, when I log into a box and 'su' to root, I get a cute little message saying I have mail (thank GOD it's not AOL). Where is this mail? What does it contain? Who/What sent it? How important ...
1
vote
1answer
25 views

WinSCP from Unix to Windows - Conserving timestamp, ownership and permissions

I'm migrating a number of folders from a Unix box to a Windows server, and I want to maintain the folder structure, permissions, ownership (user and group), and ideally timestamps of the original ...
3
votes
1answer
4k 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 ...
44
votes
4answers
16k views

What is the origin of the UNIX $ (dollar) prompt?

The UNIX prompt uses a $ symbol to indicate that your input is expected. I was wondering why this symbol was chosen—if there is a reason. Dollar just seems a little unexpected. A > symbol would ...
0
votes
1answer
4k 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 ...
97
votes
7answers
178k views

If I know the PID number of a process, how can I get its name?

If I have the PID number for a process (on a UNIX machine), how can I find out the name of its associated process? What do I have to do?
0
votes
2answers
5k views

Mount a directory in read only filesystem to read write

I want to delete a particular directory in a read only file system. How do I mount its parent directory in read/write mode, so that I can delete that? I've tried several things with googling, but ...
0
votes
1answer
22 views

Pattern search the user input in a file in Unix using awk

I am trying to write awk script to search for a pattern that is given input by user, in a file. My code look like this: awk 'BEGIN{printf "Enter : ";getline input<"/dev/tty"} /'"$input"'/ {print}' ...
44
votes
14answers
43k 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?
-1
votes
2answers
29 views

gzip unix command with tar command

I want to zip more than one file using gzip, but when I unzip it I should get multiple files. I tried tar with zip but tar created extra folders that I don't want. The files I want to zip are ...
8
votes
1answer
9k views

sudo chown fails with operation not permitted

I have found similar questions here, but the answers provided to those questions do not resolve my problem. If I do: sudo chown <username> main.m I get an operation not permitted error. ...
3
votes
4answers
3k views

Vim is not reading gzipped files automatically

I want to see some zipped log files .gz in unix through putty. When I open them in vim the contents are not readable. I think vim is not able to unzip them.
1
vote
1answer
47 views

Terminal: How to list current directory while typing out a path

I'm not sure how to phrase this correctly but I want to know how in the terminal to do the equivalent of 'ls' when typing out a path. So for example i'm typing in: sudo "/Library/Application\ ...
1
vote
1answer
38 views

I just installed GMP, where did it install to?

I am not familiar with installing programs with ./configure...make and so forth. I just installed GMP like this and now I cannot seem to find where it installed to. I checked in all the bins I could ...
3
votes
2answers
178 views

cd to real directory referenced my symbolic link

How can i cd into a symbolically linked directory but, when moving from there, doing it relatively to the real directory? For example dir_1 link_to_dir_3 -> .. dir_2 dir_3 If I do cd ...
0
votes
3answers
1k views

Executing multiple awk commands in one file

I am trying to extract lines from a file and save the output to a new file. I have been using the code: cat datafile | awk -f pullhh.txt > fuel where the file pullhh.txt contains the code ...
2
votes
3answers
703 views

using nawk, how to sum all numbers in $1, $2, and $3 fields?

Using nawk, how to sum all numbers in $1, $2, and $3 fields? 8 6 2 7 3 5 1 9 4 I want the result to be sum = 45
0
votes
1answer
25 views

At is scheduling the job but not executing the commands under it

Please help me solve my issue on at command. I am giving the below command and it is not executing. # at now at> ls -l > txt.txt at> <EOT> job 1 at 2016-04-27 11:31 when I try to ...
231
votes
27answers
127k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
0
votes
3answers
3k views

Convert PDF to JPG without Imagemagick

Is there a way to convert a common UTF-8 encoded PDF to a JPG without using ImageMagick or Ghostscript? The reason I'm asking is, that I have to replace or "simply" double layer a small part (date) ...
3
votes
3answers
422 views

Where to put libraries and headers on windows (coming from unix?)

When a unix/linux program requires "stuff", I usually put (or dpkg puts for me) libraries and headers in /usr/lib and /usr/include, respectively. I recently downloaded a library that I wish to use on ...
1
vote
1answer
27 views

How to pass array to bash shell script?

How do I pass an array as a variable from a first bash shell script to a second script. first.sh #!/bin/bash AR=('foo' 'bar' 'baz' 'bat') sh second.sh "$AR" # foo sh second.sh "${AR[@]}" # foo ...
2
votes
4answers
6k views

How to remove many detached screen sessions in Unix?

I have been working in different screen sessions in past projects, so I have a few screen sessions accumulated. Now I have been asked to remove excess/unnecessary screen sessions from the Unix box. ...
17
votes
4answers
19k views

Users don't appear in /etc/passwd on Mac OS X

By examining the /etc/passwd file, I should get a list of all users in the system. However, when dumping the passwd file on Mac OS X I don't see my current username but many entries like these: ...
21
votes
6answers
13k views

How to mass prepend text to file names?

Lets say I have a directory full of .md files all named various things. Lets say I wanted to prepend "text" to the front of each file name. So for example: file a.md, b.md, and c.md would become test ...
0
votes
1answer
12 views

Test for XML declaration and add if it's missing

I have a program which expects input XML files having an XML declaration of the form <?xml version="1.0" encoding="UTF-8"?> (all our files are UTF-8, it really has to be that string). Some of ...
113
votes
18answers
11k views

What's the quickest way to count the number of each character in a file?

I want to count the A's T's C's G's N's and "-" characters in a file, or every letter if needed, is there a quick Unix command to do this?
1
vote
5answers
352 views

UNIX how to resume a process using process ID?

I have a problem to resume processes. When I tried to get a process to come to the foreground using jobs, it works, but if I close the shell and start it again, I don't have my process in the jobs ...