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
votes
0answers
12 views

How to automate the process of shooting commands on UNIX system which is not connected directly?

Let me tell you what my requirement is. I am having my Windows system from where I am connecting the Jump Server (Unix based platform) through Putty. Once I am logged into this Jump Server, I'll ...
56
votes
12answers
31k 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
42 views

How to type commands in PuTTY by creating batch file?

I have created a .bat file which automatically takes the SSH server (Jump Server) access. Now, I have couple of commands which I would like to hit in that window. For an ex. (To take root access) ...
6
votes
3answers
5k views

Execute script/program when file changes

Is there a way to set something like a trigger on a file, so that everytime the file is changed a script or program will be executed? I only found a mechanism for this within a shell script but would ...
0
votes
2answers
210 views

Concatenate header of one file with tail of another

I have a large gzipped mysqldump file which contains some table definitions and then many insert statements. I'd like to edit the table definitions but leave the insert statements alone. The file is ...
0
votes
2answers
10k views

How to change from bash-3.2$ to [user@localhost ~]$ in UNIX

I am newbie to UNIX. When I was practicing some commands in UNIX. Earlier the Prompt was shown like this "[user@localhost ~]$". After some time it shows "bash-3.2$", but still some commands worked. I ...
-1
votes
0answers
13 views

Using vlc to batch generate snapshots say every 2-3 minutes or os?

Is there a way to batch generate snapshots every 2-3 minutes or so in Debian. I have a video of approximately 15 minutes and while I could use hotekey 's' to manually generate snapshots . Using vlc 2....
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 ...
2
votes
4answers
15k views

Installing “SoX” (Sound eXchange) via the Terminal in Mac OS X

I’m new to installing applications via the “Terminal,” so excuse my absolute ignorance on the subject. I want to install SoX (Sound eXchange), so I can do some ninja audio editing. First I installed ...
2
votes
2answers
98 views

How to sort java's .property file containg <key> = <value> by <value> column?

How can I sort this property file from java project by its value column? The value contains tabs or spaces before or after the value. Here is how this file looks like, key1 = value1 key2 = ...
0
votes
4answers
44 views

How many cores does my Mac have?

I am confused, because when I see my mac about window, I see That I have 1 Processor and 4 cores. But when I run htop, I see 8 cores What am I missing?
4
votes
2answers
763 views

How do I get bash to respect my physical directory structure? (And likewise for Emacs?)

If in bash, I do "set -P" then bash follows the "physical directory structure" when doing "pwd" and "cd .." etc, rather than the "logical one" that might be defined via symlinks. Unfortunately, bash ...
-3
votes
0answers
24 views

File size becomes 0 after download

I downloaded a file xyz.tar.gz, it shows that download went properly wget http://abc/def/ec-validation-assembly-9.2-assembly.tar.gz --2016-07-13 11:40:14-- http://abc/def/ec-validation-assembly-...
4
votes
3answers
854 views

Generate distribution of file sizes from the command prompt

I've got a filesystem which has a couple million files and I'd like to see a distribution of file sizes recursively in a particular directory. I feel like this is totally doable with some bash/awk fu,...
0
votes
2answers
14 views

To filter out its input in lowercase character

Given an input file,I need to filter out its input in lowercase character. I tried using: cat filename | tr -s "[a-z][A-Z][0-9][:space:]" "[a-z]"
2
votes
7answers
9k views

Automatically restart a Unix job if it goes down?

I have a job that I would like to "daemonize" on Unix: I want it to come up when the computer boots, and I want it to restart if it goes down. A simple way to do this is to setup a cronjob that runs ...
0
votes
2answers
42 views

How to convert date from number format to String format?

My input is [10/04/16 01:02:03 BST].How can I convert to Apr 10 16 01:02:03? And I dont want to replace / to-.
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 ...
1
vote
3answers
928 views

Concatenate multiple tar files in one command

I receive anywhere from 4 to 100 very large tar (~20GB) archive files everyday. I have been concatenating them in the past by looping through each of the archives I see on the file system and doing ...
0
votes
2answers
22 views

Passwordless authentication not working

I am trying to setup a passwordless authentication between my webserver & a reporting server using the below steps. It works fine in my dev environment , however in the customer environment it ...
0
votes
2answers
13k 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 313159@...
9
votes
2answers
29k views

How to change user in WinSCP?

I'm using WinSCP to access Unix computers. How can I change user after I have logged into a Unix server using WinSCP? E.g. I have personal account in Unix computer A. I can log into this computer ...
0
votes
0answers
26 views

Executing unix shell scripts on a remote server using local windows command Prompt

Does anyone know, without using any third party tools, how to invoke or call a Unix shell script from window command prompt or a batch file. Any links or pointers will be really helpful. Using Batch ...
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) ...
15
votes
5answers
20k views

Store the output of date and watch command to a file

I am a newbie to linux and I am trying to watch a command and try to log it into a file. I tried watch -t -n 10 "(date '+TIME:%H:%M:%S' ; ps aux | grep "pattern" | wc -l)" >> logfile and am ...
0
votes
2answers
40 views

How to collect specific information in a file

I have the need for different hardware information. such as serial numbers, capabilities, among many others, and for that, I found the hwinfo, but it gets information far beyond what I need. For ...
19
votes
4answers
20k 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: ...
0
votes
1answer
16 views

Lsof command in repeat mode no interval

How can you set the timing of lsof to sub 1 second? On lsof -r (repeat mode), is the minimum value 1 second? Is there a way to have a continuous monitoring with lsof without having intervals between 2 ...
7
votes
5answers
14k views

awk / sed to print only up to the underscore character

How can I use awk or sed to print a string only up to the first underscore character? Before: host100_044 2 host101_045 2 host102_046 2 After: host100 host101 host102
0
votes
0answers
12 views

Record all child processes spawned by a program/script

I want to record all child process Ids spawned by a long running program. Is there a way we can do that? Lets say we are running a script which does build+test and runs for an hour spawning many ...
2
votes
2answers
2k 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 ...
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? [wcyang@...
8
votes
3answers
3k views

using a second computer as a mere screen/monitor in X (VNC?)

My goal is to use three monitors with my Linux system. It is a laptop, so adding another video card is not the easiest solution. (I have investigated a number of such options: getting a docking ...
4
votes
5answers
4k views

Zipping all files/dirs in a directory except hidden ones?

How can I make a zip of all the files and subdirectories in the directory mydir, except all those files/dirs that begin with a .*? The command: zip -r mydir.zip mydir/ ...will include everything. ...
0
votes
1answer
21 views

Unix: Why it suggested to create users for some applications?

Is it some kind of encapsulation when by some tutorials I am suggested creating separate unix user. E.g. in tomcat installation instructions it said: 1 - Create a Low Privilege User Running ...
83
votes
4answers
115k 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
1answer
28 views

Linux Utility to Suspend Laptop until AC power connected?

I run a home server on a Laptop, and recently I ran into an issue where we had a storm and the power went out. The laptop I use as a home server does not have a "Wake on AC Power" function built into ...
2
votes
2answers
966 views

How to get tree -a to ignore .git directories?

I love using tree to list directories, and I have a git repository with all my dotfiles. For me to be able to see them I need to do tree -a, but that will also list the contents inside the .git ...
14
votes
7answers
11k views

Advantages of cat'ing file and piping to grep

Are there any additional advantages of cat'ing a file and piping it to grep, besides convenience? The convenience being that, when I retrieve commands such as those below from my history, the cursor ...
-1
votes
0answers
12 views

mutt command is not working with huge file size, Can anyone suggest for the same

I am using 'mutt' to send the small number of records(fetched from database and converted into CSV) through email, while if the record grows till 400k from database mutt is not able to send that huge ...
45
votes
3answers
14k views

How do I reload .inputrc?

Background I have heard that the readline module is reading ~/.inputrc and that is how it changes the behaviour of keystrokes under programs such as bash. Question How can I reload this after ...
1
vote
1answer
44 views

On HPUX, how do I list the full path to the executable for all running processes?

What I need: A list of all currently running executables with their full path. Something like this: 1234 /full/path/to/executable 4567 /full/path/to/executable2 Using UNIX95= ps -exo pid,comm I ...
1
vote
1answer
23 views

Camel-casing a 'dashed' string

I'm fairly inexperienced with *nix scripting, and I have a need to take a string with lowercase words separated by dashes and convert that to a new string with the dashes removed, and the first letter ...
0
votes
3answers
96 views

Why are Windows line breaks larger than Unix line breaks? [duplicate]

So I created two files, each with 127,955 lines and 24 random characters per line. As far as text the two files were completely identical. However one file had Unix line breaks and the other had ...
1
vote
1answer
17 views

Move a directory and its contents up several levels

I have a directory with text files in /user/data/tutorial/texts/ and I'd like to move the (sub)directory Folder2/ with all of its contents to /user/. How should I go about this using unix commands?
0
votes
1answer
22 views

Regarding files resulted in equating file properties in “ls” command

I have a folder in which there are thousands of images. Of those thousand images, I want to bring together all those images whose “Last created” and “Last modified” properties are exactly same. ( In ...
2
votes
1answer
93 views

Please explain how to use sort command in unix

I am new to UNIX. Please explain sort command. I have doubts related to sort field separator. E.g.: sort -k2, 2 filename, Please clarify. Please provide small example.
0
votes
0answers
27 views

Does dd read every possible byte from the SD card?

I have this damaged 16 GB MicroSD card which is hardly readable by a card reader (one of my two readers recognized it) and it shows up in the system as a drive with a single raw partition with 200-ish ...
1
vote
1answer
18 views

Select a specific part of the output and use it to rename files

I'm currently sorting files I recovered from a broken filesystem. They now all have filenames that go something like this: f123123123.xls If I run: file "f123123123.xls" it gives me a lot of ...
0
votes
0answers
52 views

Format external drive in single user mode mac os x

I am looking for suggestion to format external volume in Single User Mode. diskutil eraseDisk didn't work in such environment, so is there any possibility to format usb memory stick from Single User ...