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
20 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 ...
0
votes
1answer
13 views

SCP a remote file with a specific name

I have a script on a remote server that creates a log each day with the date on the name and need to import it to my local machine everyday, but with my script it transfers all the files and I just ...
0
votes
1answer
13 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
16 views

SSH and SCP giving error

I am doing the same steps (Perform SSH and SCP Without Entering Password on openSSH). But it keep asking password prompt while scp or 'ssh -l' command run. Same steps i did few days back, it was ...
2
votes
1answer
18 views

Can I create a symlink or similar that returns a random file from a set every time?

Say I have files foo-a.wav, foo-b.wav and foo-c.wav on disk. I have a piece of software whose interface allows me to enter the name of a single sound file; every time a certain feature of that ...
-1
votes
2answers
21 views

Regarding concatenating prefix to a file

I want to concatenate one prefix to the file inside sh script. Please suggest it. Is this correct? For example: file=a.txt prefix=b mv $file $prefix_$file echo $prefix_$file will it give me ...
0
votes
0answers
20 views

UNIX shell only [closed]

Are there anybody who use only *NIX shell like bash or tcsh for everyday tasks ignoring completely GUI file managers like Gnome, KDE and also orthodox filemanagers like midnight commander? Is it ...
0
votes
4answers
76 views

Split text stream by hash value of first field in line

I am looking for a fast filter that will take a text file on standard input, hash each line up to the first tab character, and put the line into a different file depending on the hash value (modulo ...
1
vote
0answers
41 views

File shows different size after copying to another directory

I used cp -rP <dir name> <new dir name> to copy the contents of a directory, including permissions etc from one dir to another. The odd thing is, either du is giving me some strange ...
0
votes
1answer
18 views

How to make exiftool not to change file's date and time

How to make exiftool not to change the date and time of the affected files? I mean not the date and time written in EXIF, I mean the date and time of the file itself.
11
votes
2answers
260 views

Why does redirecting the output of a file to itself produce a blank file?

Why does redirecting the output of a file to itself produce a blank file? Stated in Bash, why do less foo.txt > foo.txt and fold foo.txt > foo.txt produce an empty foo.txt? Since an ...
0
votes
0answers
18 views

ImageMagick Script Error: ': No such file or directory @ error/blob.c/OpenBlob/2644

I am trying to run the following script in terminal: mogrify -resize 900x10000 *.JPG mogrify -resize 900x10000 *.jpg for f in *.JPG do echo "<tr><td><img ...
0
votes
2answers
34 views

Maximize cpu load average without consuming resources [closed]

As a fun exercise, what is the best way to maximize the unix CPU load average without actually consuming lots of resources (CPU cycles or memory)?
0
votes
2answers
41 views

Regex for unix paths

What would be the correct perl regex for detecting only Unix paths? ./dir1/dir2/file.ext - invalid ./dir1/dir2/ - valid ./dir1/dir2 - valid
0
votes
1answer
14 views

Expect not working using -c arguments

So I have an expect script like this that works: #!/usr/bin/expect spawn scp me@myserver.com:* . expect { password: {send "mypassword"; exp_continue} } Based on the man page for expect, I think I ...
0
votes
0answers
25 views

udev rule not working on Debian [closed]

I have created a udev rule which is supposed to mount a USB device, backup some data and clean up everything. I am actually working on a Debian server. Here is the information about my USB device ...
0
votes
1answer
26 views

Add a window padding to guake

Text is too near the edge of the screen, I'd like to allow a small 10 pixel padding on all sides to comfort my eyes. Is this possible? I'm using guake.
0
votes
1answer
33 views

SanDisk USB drive - used space doesn't add up

I have a 32GB SanDisk USB drive (vfat partition type). It's as I received it - I haven't played around with the partitioning or added any encrypted sections or anything. The disk properties show that ...
1
vote
1answer
27 views

Check if Vim has more than one window open

I'd like to overload my tmux binding which cycles through panes to also cycle through Vim windows if the current pane happens to be running Vim. I can detect the presence of Vim by checking the pane ...
2
votes
3answers
79 views

Is it possible to put foreground process into background without suspending (control +z)?

I am running an application which receives TCP and UDP packets and therefore cannot be suspended. I intially ran 3 processes of the same application, with different arguments, in background mode using ...
1
vote
2answers
73 views

How to rename to existing folder

i am not able to rename the folder name. i tried these ways. please correct me, [testuser@backupdev1-lnx backup]$ cd /opt/backup/ [testuser@backupdev1-lnx backup]$ ls -l total 8 drwxrwxr-x 2 ...
0
votes
1answer
35 views

Prevent users from being able to pipe output to another users terminal?

So currently on this server if two people are logged into the same server, you can do something like: -bash-4.1$ cat /dev/urandom | write username It will print a bunch of junk to their terminal. I ...
0
votes
1answer
16 views

Writing a tcsh script to copy files specified in first argument to a specific directory

I'm trying to write a script in tcsh that will copy select files that I specify at the command line from one directory to another without having to write out the entire path of each file. Also, to ...
0
votes
1answer
14 views

Modify Several Plist Using a Script

defaults read /New.plist itemName the Output Will Be Some Thing Like "Software" but i want the new Data to be updated for the key as "Software Old Version" the problem is i have to modify several ...
0
votes
0answers
28 views

Unix '$ ls -a' Command Not Showing All Files or Directories [closed]

I'm using Mac OS 10.8.3. In Terminal, from Users/*currentuser*/Library/WebServer I noticed the ls -a command is not bringing up all the directories and files in the WebServer folder. When I change ...
0
votes
4answers
14 views

short alias for file in bash command

I want short way to access files, which i usually use in bash. For example, see logs. Now i use: less /var/log/user/server.log less /var/log/user/server2.log I want shortcut, to do less server.log ...
0
votes
1answer
30 views

What does shiftwidth do in VIM editor

I read this about shiftwidth option on Google: To change the number of space characters inserted for indentation, use the 'shiftwidth' option. Ok Ok, but what's that more exactly? How can I try this ...
1
vote
2answers
42 views

Unix moving/removing files from subdirectories

if there are several subdirectories in the current working directory, i would like to move only specific filetypes or possibly all the contents of those directories, to the working directory. and ...
0
votes
4answers
36 views

Vim inserting characters before a comma on multiple lines

Say I have the following DRAFT, SAVED, ARCHIVED, DELETED; And I want the following: DRAFT("draft"), SAVED("saved"), ARCHIVED("archived"), DELETED("deleted"); How can I do this with vim? I'm ...
-7
votes
0answers
42 views

UNIX shell script [closed]

Hi all I have a script in UNIX which has some sql queries in it and I just want to execute these queries in windows in mysql database. This is the script: if [ $# -ne 5 ] then echo \ "Usage: ...
0
votes
1answer
51 views

What does the default /etc/profile on Mac OS X 10.8 look like?

Some idiot altered my /etc/profile file, and I want to revert it to the system default, because I have now realized that I would rather override whatever needs to be overriden using files in my home ...
2
votes
2answers
26 views

Place contents of last command line output into clipboard

I want to be able to run a command in my Terminal, and then quickly be able to copy the contents of the output into my clipboard without leaving my keyboard. Is there any way to do this?
1
vote
3answers
23 views

print specific line and then some more

I am trying to search a file for a pattern and if the it is found I want to see the line and 10 more lines of the result. so far I have grep -n pattern file | cut -d: f1 now not sure how to use ...
0
votes
0answers
30 views

How to get timestamp since epoch in Windows?

I want to measure the time of start for a program but for this I want to get the timestamp in Windows, but I need to get the time-stamp in mili-seconds since the Unix epoch format. (The Unix epoch is ...
0
votes
2answers
41 views

Issue with find: invalid predicate '-delete'

I try to run (unix-shell, win7): find . -maxdepth 1 -name "*.jpg" -size -50k -delete and get the error: find: invalid predicate '-delete' any hints?
0
votes
1answer
27 views

Backup bootable USB flash in Mac OS X

I have a bootable USB. It runs Linux. The size of USB pen is 8Gb, and linux partitions take less than 200Mb. $ diskutil list /dev/disk0 #: TYPE NAME SIZE ...
0
votes
2answers
19 views

Setting an alias only for current user in Unix

I want to create a Unix alias, that allows me for example to type l for ls -l. Nevertheless, I do not want to modify the file /etc/bash.bashrc as that one applies to all users I believe. How can I ...
0
votes
3answers
38 views

Does Unix grep work faster with long or short search terms?

Is it faster to look for long or short search terms? Or does it affect speed at all? In other words, should you make search terms as exact as possible? There are more than 100 000 files and each file ...
1
vote
3answers
88 views

whats the difference between chmod 777 and chmod 7777

I have a professor who insists on always typing chmod 7777, but I was taught that chmod 777 was the proper convention. I tried them out on the command line and chmod 777 something.txt yeilds ...
1
vote
1answer
36 views

Problems with locate

Wondering if someone can enlighten me as I believe that perhaps my expectations are wrong. When I use locate I almost never get what I am expecting. For example... I removed a software package and ran ...
1
vote
1answer
29 views

What happens if number of processes greater than pid_max?

Provided I do not edit the file : /proc/sys/kernel/pid_max. Therefore, I assume the maximum PID would be 32768. What happens if I create 32769 simultaneous processes?
2
votes
3answers
47 views

Where are aliases set in CentOS?

There is a typo which causes an error message upon logon (someone typed lias instead of alias). I have checked /etc/bashrc as well as ~/.bashrc and /etc/profile as well as ~/.bash_profile for ...
0
votes
1answer
43 views

Memory usage classification under Darwin (Mac OS X 10.8)

on Mac OS X using Memory Clean, I can behold this memory usage stats chart: While the meaning of active and free seems to be clear, what do "wired" and "inactive" memory refer to?
3
votes
2answers
38 views

Wait until SSH succeeds creating a port forwarding

I am calling ssh (OpenSSH) from a OSX/Linux-C++-Application via fork/exec to create a dynamic port forwarding. This is done using batch mode (-o BatchMode=yes) and a private key which is supplied to ...
0
votes
0answers
19 views

Can not delete folder with svn control files created by other user

this problem happened on a SunOS I (not root user) want to delete a folder "def"(contains sub folder and files) created by other user, I have the full control of "def"'s parent folder(say "abc"), but ...
5
votes
2answers
200 views

Cygwin Connection closed by ::1

During the installation of Hadoop I am trying to setup CYGWIN and ssh. Installed and ssh also started successfully and setup authorization key as instructed HERE but When I try to connect to the ...
0
votes
0answers
22 views

Installing mono without root privileges

I use mono on my mac now for my .NET development, when I dont feel like using my pc, but I want to use mono on my Universities linux server, but I dont have root. Is there a way I can install mono in ...
2
votes
2answers
27 views

Monitoring a process

I'm reading documentation on supervisor, and it quotes: It’s often difficult to get accurate up/down status on processes on UNIX. Pidfiles often lie. Supervisord starts processes as ...
0
votes
1answer
64 views

CYGWIN SSHD service not starting

To setup Hadoop I am installing CYGWIN on my 32 bit Windows 7 machine. It has installed successfully without any error. CYGWIN Setup version : 2.774 $ uname -r : 1.7.17(0.262/5/3) SSHD installed ...
0
votes
3answers
33 views

How to tar/zip a parent directory exculding a child direcory

I want tar a direcory which contains a number of child directories. But here my requirement is to tar the entire parent direcory excuding one child directory. Is there any command or procedure for ...

1 2 3 4 5 45