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
3k views

Encoding with FFmpeg using a FIFO

I'm trying to convert Flac audio file to AAC file using command line. So I wrote this ffmpeg -i input.flac temp.wav faac -q 120 -o output.m4a temp.wav It's working fine. Now I want to do ...
0
votes
3answers
2k views

Sorting is not consistent using the Unix command 'sort'

I'm running the command: zcat [File] | sed "1d" | sort -t $'\xE7' -k [field to be sorted] > [file].sorted When I run this on File A, sorting on field 1, I get the following result: 11622400 , ...
0
votes
2answers
2k views

Compress and uncompress of files in UNIX

Kindly help to zip,gz,tar,.... a normal text file and recamand to use a one which reduces the size .
0
votes
1answer
104 views

Bug in (small) bash script

I've been trying to find a bug in this test script, but haven't been able to so far. I'm not lazy, I promise...just new to Bash so am having a hard time catching syntax errors. I'd really appreciate ...
0
votes
2answers
31 views

is it possbile to dowload one part of a file from web?

lets say there is one very big file on some server and i just want to download first 1MB. How can I do it on Linux ?
0
votes
4answers
2k views

Unix: Search and replace in file names

Using sed, I can search and replace text in a file. Is there a way I can do search and replace of filenames? For example if I have a bunch of files in a folder with names like these: foo01 foo02 ...
0
votes
1answer
145 views

Windows date reprensentation

I was debating about the 2038 bug on unix with a friend (the 32 bit timestamp bug). We were actually wondering on how windows store the dates itself ? I was thinking it was a simple DateTime but how ...
0
votes
4answers
28 views

What issue exists when multiple lines of 'date' are used in bash?

I'm currently reading through a book on bash programming, Pro Bash Programming. At one chapter (Chapter 4) they ask what problem the following script has. I myself have no clue after reading through. ...
0
votes
1answer
33 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
2answers
29 views

How can I start the process that doesn't die even after I close ssh? [duplicate]

I am sshing to my remote CentOS 5 server and want to run a script that takes long time. How can I have it keep running even after I close ssh session?
0
votes
2answers
47 views

Vim: how to perform this task every time I open a file?

For a time I have one vim configuration on my laptop and another on my desktop, so when I edited filed on my Dropbox between the two I would end up with format issues. Specifically, I had ...
0
votes
1answer
43 views

Shell Command that Combines chmod and chgrp

Is there a combined variant for chmod and chgrp that sets both user and groups permissions in one single system call for each file? This is useful for increasing performance on slow data layers such ...
0
votes
2answers
103 views

How can I delete half of the files in a directory?

A directory has files with names ending 001 to 100. How can you delete 2,4,6,8...100. And can that be written as a script. As soon as the directory becomes week old, this has to run. And after a month ...
0
votes
1answer
281 views

How do I make less open binary files without confirmation?

I have several log files that contain a few bytes which are not displayable characters (due to binary signatures on the requests). Every time I open them with less I get asked: $ less ...
0
votes
2answers
302 views

Unable to SSH, cannot create /dev/null/.ssh

I am trying to deploy hadoop with a master and slave node. But the master fails to start tasttracker and datanode processes in slaves, as it is not able to ssh into slaves. The error message is 'Could ...
0
votes
2answers
223 views

using url with Putty to access Unix server

I need to access UNIX server from my windows machine and will be using PUTTY. Can I access the UNIX server with the url rather than direct IP address? I am getting error that host cannot be found ...
0
votes
2answers
203 views

which unix or linux command is used to change root password of remote machine(Just an IP address) without using SSH Login

which unix or linux command is used to change root password of remote machine(Just an IP address)? Suppose I just have an IP address of the target machine which is on my network, But I do not know ...
0
votes
5answers
420 views

Little clarity needed about: PC and Mac and Unix

I've always thought that a PC and A Mac were two different computing platforms, not just with in their operating systems (Windows & Mac OS) but different from hardware to thier respective internal ...
0
votes
2answers
102 views

Formatting a file for sendmail

How can I format a file so I can just do cat file | sendmail? By putting Subject: This is the subject, I don't need to specify the subject in sendmail, but adding the To: myemail@hostname.com field ...
0
votes
2answers
54 views

Is there any limitation on file names under Unix?

We are using crontab to schedule jobs and it was not picking the files for processing that contain [ or ] or ¿. Is there any limitation on file names or do these characters mean something in UNIX? ...
0
votes
1answer
539 views

Remove question mark “?” from file names OSX

My music library contains many .flac files that need the "?" removed from the filename as my current music player (Sonos) cannot for some reason see those files. Is there a command or script that ...
0
votes
1answer
323 views

Can I tell if I'm in an scp session in my .bashrc?

Inside my .bashrc, I'm doing a bunch of magic that causes problems when I'm trying to do an scp. The solution I've been going with is to manually ssh to the target machine, disable my .bashrc, do the ...
0
votes
2answers
38 views

Using only 1 command line, how do I write a command to that will do a long list of all files in the storage/file directory

Using only 1 command line, how do I write a command to that will do a long list of all files in the storage/file directory and pipe the output to a grep command that finds all items containing the ...
0
votes
3answers
76 views

What is the effect of using a # in front of a UNIX command?

My guess from the working of it is that it suppresses the output of the command
0
votes
2answers
183 views

How to close firefox service from putty?

How can i close firefox service from putty?? I have tried using service command.. But i don't know the exact syntax.. I am getting following warning box Firefox is already running, but is not ...
0
votes
1answer
498 views

How to call and launch EXE from linux \unix side?

I have a build process that runs on Linux and UNIX hosts. It's script -based, and at the end of the process I'd like to run an EXE file (that can run on Windows only... yes I know it's quite weird but ...
0
votes
1answer
652 views

Map `php` at the command line to point to `/usr/bin/php`?

For some reason using php at the command line references /usr/local/bin/php instead of /usr/bin/php. How can I make $ php script.php the equivalent of running $ /usr/bin/php script.php? Current ...
0
votes
1answer
97 views

Attach screen on a running terminal

I have a long running process in a (virtual) terminal that unfortunately was not started in a (gnu) screen session. Is there a way to migrate it in a screen session? (obviously, without stopping it) ...
0
votes
1answer
426 views

How to make terminal title to stick on Macs

I'm not sure if this is a problem with my mac, of which I'm a noob with, or if it's a setting of the server I'm sshing into. What I'm doing is this: Open a new window in terminal SSH into a CentOS ...
0
votes
2answers
466 views

Writing Unix script (bash) that creates a directory in the location specified at the command line

I currently have a Unix script (written in bash) that executes several commands to modify a group of files, which I specify with an flist containing their paths. The general idea of the script is to ...
0
votes
1answer
1k views

UNIX command to sort the file by the following words, from major sort key to minor sort key: word 3, word 1, word 4

Need help with the UNIX command below to sort the file by the following words, from major sort key to minor sort key: word 3, word 1, word 4. (words are separated by white spaces) sort -t -k3 -k1 ...
0
votes
2answers
150 views

Silent cd using cdpath with zsh?

When using cd to navigate to a path found by cdpath that is not located relative to ., the resulting path gets echoed. For example, assuming a directory structure like ~/parent/child and a cdpath like ...
0
votes
1answer
560 views

How to use chmod to change a file's permission?

I used ls -l to find file permissions in a shell and found this: File 1: -rw-r--r-- 1 root root 451 Mar 9 15:25 file.class.php File 2: -rw-rw-r-- 1 andy dev 872 Mar 9 15:43 file.class.php I want ...
0
votes
1answer
1k views

Grep issue (match two strings on same line)

Here I have some grep command which is not working correctly: cat file1.txt: apples Date: Sun, 24 Feb 2013 8:14:06 -0800 peaches melons cherry sky cloud green purple yellow cat file2.txt: apples ...
0
votes
1answer
217 views

the effect of large number of files on disk space in unix filesystems

If I have a text file in Unix that contains N-many independent entries (e.g. records about employees, where each employee has a separate record), is it expected that this file will take up less space ...
0
votes
2answers
413 views

File doesn't exist in Linux although it's located in Terminal

I'm a bit new to unix/linux environment, but I have a small problem. I'm using "locate" to find the path of a file I need, it gives me the path for it, but the file doesn't exist in that path, like ...
0
votes
1answer
122 views

differnce between blocksize and bytesize in linux/unix filesystems

Can anyone discuss the exact difference between block size and byte size, when it comes to disk sizes for Linux/Unix filesystems.
0
votes
2answers
158 views

Shell script: Copy folder with a new name

I'm trying to write this shell script to create in the parent directory a copy of the folders found in the current directory. So far, I wrote this: for folder in *; do mkdir ../$folder; done ...
0
votes
1answer
2k views

Find out which port the daemon is using [duplicate]

Possible Duplicate: Finding the process that is using a certain port in Linux Suppose I run some daemon but I didn't remember which port it usually use. How can I obtain this information?
0
votes
3answers
1k views

how to prevent brute force attack on ssh?

i am running centos. how can i best avoid a brute force attack on my ssh server? I found this list: DenyHosts is a Python based security tool for SSH servers. It is intended to prevent brute force ...
0
votes
2answers
3k views

Is Mac OS X a UNIX-based OS? [duplicate]

Is OS X Mountain Lion a pure UNIX-based OS? Some tutorials say that it is a Unix-like OS, but after version 10.5, all Mac operating systems are based on pure UNIX. Is this true?
0
votes
1answer
381 views

What is a child process?

I have an error in my error logs that I am trying to figure out but I don't know what to be looking for when it says Child Process. I understand that its a process done by a parent, but that's an ...
0
votes
1answer
96 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 ...
0
votes
3answers
283 views

Replacing quotes in a file

I have a large number of large semicolon-separated data files. All string fields are surrounded by double quotes. In some of the files, there are extra quotes in the string fields, which messes up the ...
0
votes
1answer
539 views

Unable to run commands with “sudo” from my user

For some reason, I am unable to run any commands with su as my user. This was working before and I'm not sure what broke it. The funny thing is that I can su to root without any problems. Example: ...
0
votes
2answers
509 views

command to show number of processors in UNIX

I want to check the number of processors using by a particular process in unix solaris. Which command we can use for that? Thanks, D.
0
votes
1answer
773 views

Unable to install finger package in Ubuntu

I am unable to install the finger package in Ubuntu .Below is the output on my terminal when I tried running the command `sudo apt-get install finger` ritesh@ubuntu:~$ sudo apt-get install ...
0
votes
1answer
88 views

Python by default on all unix systems? [closed]

There was a discussion on which language to choose for a system checker. The system checker is supposed to be a script running on unix systems. On Gnu/Linux systems seem to always have it installed ...
0
votes
2answers
2k views

Can't access Terminal anymore, only shows a cursor

I run OS X. Following these directions (Installing MySQL on Mac OS X) I added a file to /usr and the contents were PATH=/usr/local/mysql/bin:$PATH Actually I was trying to get the mysql command ...
0
votes
1answer
383 views

Running cronjob on specfic hours

How do i setup a cronjob to run every hour except from 11pm until 1am ? Because during that time, the system is doing maintenance. Cheers