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
1answer
20 views

how to get the status of commands executed inside ssh connection

I have an ssh connection where I am running 2 commands. I want to know the status of each command after execution. the code is like below: ssh $username@$server -t <<'XXX' command 1 command ...
0
votes
1answer
37 views

how can I add a path permanently [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? Every time I open my secureCRT window,I need to run the below to export the path..is there ...
2
votes
2answers
2k views

Unable to do passwordless login to FreeNAS

I'm trying to use this command to allow me passwordless login to a FreeNAS box: cat ~/.ssh/id_rsa.pub | ssh root@server.com 'cat >> ~/.ssh/authorized_keys' But I get: ...
1
vote
3answers
3k views

Linux/Unix command to join N lines of input with delimiters?

At the Linux/Unix command line, I want to turn this: A B C A B C . . . into this: A,B,C A,B,C ... Is there a simple built-in command to do this, or does this require diving into Awk, Perl, etc.? ...
9
votes
7answers
5k 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
3answers
1k views

How to set domain name for server running on ip address

Right now server is accessed via IP Address http://10.1xx.19.2xx:8080/svn How can i change it to http://domainname.com/svn ? Which file to edit ?
0
votes
1answer
14 views

Move child folders into a different folder

I am new to UNIX, and I am trying to write a shell script that would move all folders that are older than a day in log archive directory into another folder. Below is the command I am using for doing ...
0
votes
2answers
20 views

batch rename multiple mp3's stripping leading digits

Hi could anyone help me? Im trying to strip leading digits from multiple mp3 files so "01 some_file.mp3" would become "some_file.mp3" if any one could show me how to doit with zmv that would be great
0
votes
2answers
25 views

Change to xth directory terminal

Is there a way in a unix shell (specifically Ubuntu) to change directory into the xth directory that was printed from the ls command? I know you can sort a directory in multiple ways, but using the ...
-1
votes
2answers
44 views

If we have a collection of Linux computers on a LAN, how to write shell script to shutdown all computer [duplicate]

I have lab and in that ,collection of Linux computer are connected in LAN. i want how to writ e shell script to shut down all PC when we run that shell script.
10
votes
3answers
2k views

Calling a script with ./bla.sh vs. . bla.sh

Can anybody explain to me what the shell does in the two examples A) and B) below? It obviously behaves differently, but I can't find out why the output is different. Example: Let's have a script in ...
0
votes
2answers
121 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 ...
1
vote
2answers
228 views

ssh and cd into current directory

When I ssh into mycomputer from logincomputer, I would like to automatically cd into the current directory (the one from which the ssh command was executed) on mycomputer. In particular: > cd ...
0
votes
2answers
110 views

cd shortcuts: symbolic link to CDPATH dir

I found a solution to another question and posted here and wanted to implement it. On OSX, in order to create cd shortcuts, it advised creating a hidden folder with symbolic links, and then adding ...
169
votes
12answers
25k views

How can I change to the previous directory instead of going up?

I currently spend a lot of my working hours moving back and forth between two paths which are very far down the tree and divert from each other at root. It strikes me that my life would be a lot ...
3
votes
2answers
2k views

using xargs to cd to a directory

Feeling like an idiot right now. Why does this not work? echo "/some/directory/path" | xargs -n1 cd
2
votes
4answers
1k views

Alternatives to cd/ls for command line navigation?

I generally work a fair amount from the command line in order to launch vim, git, ssh and so on. However, I find the Finder's columnar view more natural for browsing through my files. Unfortunately, ...
0
votes
3answers
47 views

Zero sized tar.gz file found inside a tar.gz file

My current directory contains a single file like this- $ls -l -rw-r--r-- 1 root staff 8 May 28 09:10 pavan Now, I want to tar and gzip this file like $tar -cvf - * ...
4
votes
3answers
3k views

Bash Script: Invalid argument

Why can't I use echo $1 > /sys/class/backlight/acpi_video0/brightness in a simple bash script? It gives me the error: echo: write error: Invalid argument.
5
votes
8answers
17k views

What are ways to figure out how old my computer is? [closed]

What are ways to figure out how old my computer is?
0
votes
2answers
892 views

How to install and uninstall Java 7 in Solaris 11 x86?

How to uninstall java jdk6 and jre6 from Solaris 11 x86 OS? and install java7? How to set the path and class path?
4
votes
2answers
2k 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
1answer
32 views

How to retrieve all messages from someone using lync

How can I get all messages from a person I have lync-ed, please?
2
votes
3answers
4k views

Is there a limit on the number of files in UNIX?

Is there a limit on the number of files in UNIX in the filesystem?
1
vote
1answer
19 views

Unix mail command: Sort by newest first

When I use the "mail" command, it prints a list of messages in my inbox in a format like this: 1 Super User Mon Jun 9 17:13 86/4716 Complete Registration With Stack Exchange However I've ...
7
votes
5answers
5k views

How can I compare two directories, one being a remote directory?

I want to compare two directories, one is local and the other is on another machine. How can I do that? Can I do it with diff?
0
votes
0answers
7 views

How can I activate the Front Panel in CDE?

We installed a new Solaris work station at work and most of them come with the Front Panel, however the latest did not. How can I activate it?
0
votes
2answers
33 views

Is there a unix command to output time elapsed during a command?

I love using time to find out how long a command took to execute but when dealing with commands that execute sub-commands internally (and provide output that allows you to tell when each of those ...
21
votes
5answers
10k views

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

The place I work 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 ...
0
votes
1answer
77 views

Why do python's os.stat and du and ls not agree on block size?

While writing a simple function that computes the quantity of blocks consumed in a directory, I checked with du to see that I was getting the same answers. Why do ls and du say this file occupies ...
1
vote
2answers
165 views

Can files be recovered after a failed mv command?

I used mv * .. in Unix to move all contents of a directory to its parent folder. There was a folder called "Downloads" in both the current directory and the parent. The one in the parent was empty to ...
0
votes
2answers
48 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? ...
3
votes
1answer
773 views

Unix command to get number of lines in a CSV file

I have to get the count of lines from incoming CSV files. I have used the following command to get the count. wc -l filename.csv Consider files coming with 1 record I am getting some files with * ...
2
votes
3answers
648 views

vi editor text is flashing and unusable

I'm using vi on linux - vi --version gives: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 16 2010 12:47:47) A few weeks ago, for no apparent reason, every time I use vi the entire text is flashing, ...
1
vote
1answer
24 views

Can I create a “symlink-esque” file to “merge” two files together?

I'm dealing with an application that reads a config file, config.yml, from the current directory. This config file contains both secret information (API keys) that shouldn't be checked in to source ...
0
votes
0answers
22 views

Solaris - Inheriting by files the user's ownership of directory

I have a directory with ownersip like user:group. I want to make on it something like suid on group, but for user - all of new created files have a directory ownership. For example: drwxrwx--- 2 user ...
10
votes
5answers
828 views

How to jump back to the first character in *nix command line?

When writing a long command in the *nix command line and having to go back to the first character, in order to add something at the beginning (for instance a nohup, when you realize the process will ...
0
votes
2answers
79 views

Is it better to check if file exists before deleting it

Sometimes when I want to delete a file (from within a script), I will just delete it rather than checking if it exists first. So I do this: $ rm "temp.txt" 2>/dev/null Instead of this: [ -f ...
90
votes
10answers
48k views

How do I set up SSH so I don't have to type my password?

How do I set up SSH so I don't have to type my password when connecting to a host?
0
votes
1answer
51 views

Windows 8 cannot access samba while other OS do

I found some related topic, but they do not answer my problem or weren't enough accurate. I have a samba on a ArchLinux machine (a rapberry), which can be accessed from Android and iOS apps but not ...
1
vote
2answers
54 views

CURL used in shell

I am executing a shell script in which one curl command is present. I have to store the output of curl command(xml format) in a file and display the result on screen. For this to happen "tee command" ...
4
votes
1answer
1k views

Put 'nix box to sleep from command line?

What command(s) do I type in the terminal to put the computer to sleep?
0
votes
1answer
66 views

Delete file if number in filename less than xxxx

I have thousands files in format randomstring_XXXXXXXX.jpg where 'xxx' is unixtime (1388415305). Now I need to delete all files older than some (unixtime) date. Does anyone have a solution for this?
35
votes
4answers
119k views

What is the .bashrc file?

Unix shells when starting read the .bashrc file and execute commands contained in them. What is this file and what do they execute?
1
vote
2answers
95 views

What risks are there in stopping and resuming processes in Linux?

Let's say I stop a process using Ctrl+Z and resume it five hours later using fg. How risky is this with regards to the proper functioning of the process? For instance, imagine that vim is working on ...
0
votes
0answers
43 views

FTP: Connection Refused

I am trying to transfer files between a Linux PC to a Windows PC. I can ftp the Linux PC with localhost ftp localhost prompts for the username and password and the login is successful. But when ...
0
votes
0answers
34 views

Idle timeout Bourne-style shell

Is there any way to timeout idle users in Bourne-style shell (/bin/sh). man sh does not talk about it. http://www.freebsd.org/cgi/man.cgi?sh TIMEOUT or TMOUT shell env variables in /etc/profile ...
0
votes
0answers
22 views

How to temporarily disable rsh between machines for user only

First, please note that I am just a regular user. I cannot do anything as a super user. Our sysadmin has enabled rsh between machines in our local network. That is, I can do this: [user@machineA] ...
4
votes
1answer
471 views

What file is used during login on Unix?

When you log in to a shell on a Unix system there are usually some files that are run in your home directory. You'd use these to, for example, set up aliases and additions to your $PATH. But, how do ...
10
votes
9answers
5k views

“Detach” and “Reattach” xterms across X sessions?

Is there a way to save/detach an xterm (or another window), and reopen/load/reattach it on a different X session on the same machine ? What I'm trying to achieve is "move" running xterms between two ...