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

18
votes
3answers
813 views

How does Linux know that the new password is similar to the previous one?

Few times I tried to change a user password on various Linux machines and when the new password was similar to the old one the OS complained that they are too similar. I always wondered how does the ...
0
votes
2answers
21 views

Why doesn't this Linux symlink work?

I'm trying to create a symbolic link for the file logs inside home/dir1/ to the file netlogs inside home/dir3/. The link is created but when I try to look at the contents of netlogs I got this error ...
-1
votes
0answers
37 views

Why does windows have javaw and java?

Can someone explain to me why windows has a javaw and java executable while unix based systems only hava java. I'm assuming it has to do with the gui and cmd headers in windows but I don't actually ...
0
votes
0answers
16 views

Recommended tool for read/write checking (hard/usb) drive (if thumb drive is bad) [on hold]

I'm looking for a tool that does read/write testing on a drive in order to find out if the data was written correctly, similar to what memtest does. For example, some usb thumb drives sold are ...
0
votes
2answers
17 views

What's the smartest way to copy-rename (backup) several files in different folders at once in the shell?

I want to copy-backup several files in different folder at once before updating ntpd. Example (one file only): sudo cp /usr/sbin/ntpd /usr/sbin/ntpd.old Files: /usr/bin/sntp /usr/bin/ntp-keygen ...
0
votes
2answers
30 views

find /data/oozie-admi/ -type d -ctime +1 | xargs rm -rf [0] command deleted /data/oozie-admi/ folder

/data/oozie-admi/ folder contains multiple directories. This command find /data/oozie-admi/ -type d -ctime +1 | xargs rm -rf [0] deleted /data/oozie-admi/ folder . Need to find out scenarios in ...
2
votes
1answer
13 views

How to collapse all trees in htop?

I would like to be able to collapse all the trees in the default view of htop. Is there a way to achieve that at once, instead of selecting every tree and hitting F6?
1
vote
2answers
23 views

Nmap runs slower as root than normal user

I am working on a bash script to enable automatic detection and remote control of my company's proprietary data recorders. The recorders run a custom version of linux and are essentially powerful pis ...
0
votes
1answer
29 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
0answers
9 views

Can conky escape its variables as proper JSON?

This might be a better fit for the unix exchange, but I figure a lot of people here will be knowledgeable about conky. While trying to use conky output for use with i3bar, I've found that it will ...
0
votes
0answers
21 views

Is it possible to modify .bash_logout?

I am trying to modify .bash_logout to append the shell history to a txt file. I am also trying to figure to make some restrictions on that file. I have tried a bunch of commands while searching about ...
1
vote
0answers
24 views

How can I mount NFS file in unix?

I am using Cent OS 5.6 and I have two VMs. I am trying to mount a file but unable to do so. Here's what I have done. Mkdir/uxadm Chmod 777 /uxadm vi /etc/exports /uxadm ...
1
vote
0answers
11 views

Find the creator of an idle TCP connection

On Solaris (or Unix), how can I find the remote host associated with the creation of a currently idle TCP connection? lsof gives me a bunch of lines like this: java 25375 foo 8161u IPv4 ...
0
votes
2answers
23 views

How to append data in a file by dd?

I want to append new data in a file stored in SSD. dd if=/dev/shm/test of=/data/sdb/test bs=1G oflag=append But df -h shows the dd command always overwrite the test file, instead appends new data ...
-1
votes
0answers
25 views

Where is the program executed: server side or client?

If I am using something like PuTTY to program things in Unix via a server, and I compile and execute a program written in PuTTy, is it possible that my computer's specs will determine the speed of ...
1
vote
2answers
36 views

ffmpeg: disable one of a several audio streams

I've got an video file with two audiostreams: Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 960x540, 58 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc Metadata: ...
0
votes
3answers
39 views

Unix Command to grep a time range

I have a log file, saved with particular date. I wanna fetch log entries during a particular time and date range to another file. Ex: all entries from 2014-12-04 00:00:00 time to 2014-12-04 17:00:00 ...
0
votes
1answer
26 views

rename only the last directory in the tree

The below command in unix will rename all the directory with the name Utility to Claim, when executed from the top level find . -type d -name Utility -exec sh -c 'mv "${0}" "${0%/Utility}/Claim"' {} ...
0
votes
0answers
27 views

Syntactic differences in cp -r and how to overcome them [migrated]

Let's say we are in a blank directory. Then, the following commands: mkdir dir1 cp -r dir1 dir2 Yield two (blank) directories, dir1 and dir2, where dir2 has been created as a copy of dir1. ...
0
votes
2answers
26 views

Why redirecting FINDSTR output produce UNIX line ending?

When I issue this command: FINDSTR /I /N "<sdk:extra>" addon.xml output is: 973: <sdk:extra> 995: <sdk:extra> 1017: <sdk:extra> 1036: <sdk:extra> 1057: ...
-2
votes
2answers
48 views

How can I create a script in Unix with following requirements? [closed]

A script named /root/backup.sh on w01 that will backup the contents of /home The script will: Create a tar archive named /share/<YYYY><MM><DD>_w01.tar where YYYY represents the ...
1
vote
1answer
16 views

Unable to remove a directory

I'm using SUSE and I'm trying to delete an empty directory When I use ls -la it shows that that it contains .fuse_hidden0000001700000010 with rw for owner (that's me not root). I cannot delete this ...
0
votes
0answers
6 views

Mac OS Yosemite popd: How do you keep the dir in the stack and cd to that dir at the same time?

As the document of popd says, using "-n" will keep the dir in dir stack, but on OS X Yosemite, when the dir stack is like this: 0 ~/0 1 ~/1 2 ~/2 3 ~/3 and if I use popd +2 -n The working ...
0
votes
1answer
17 views

How to correctly mount a tmpfs?

Excerpted from the documentation So 'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs' will give you tmpfs instance on /mytmpfs which can allocate 10GB RAM/SWAP in 10240 inodes ...
0
votes
2answers
23 views

Replace random string using sed

How do I replace random strings using sed. For example if I have a text file like this: EF125353.1 to be replaced 1 EF125353.1 to be replaced again 2 EF125353.1 to be replaced etc etc 3 ...
0
votes
0answers
38 views

Batch file unable to run commands after launching putty

I am writing a batch file abc.bat which is used to launch putty. I want the .bat file to go to a particular folder (in PuTTY), source it in csh and go to a particular path on that server. I wrote the ...
0
votes
0answers
11 views

/usr/local and /usr/share detailed explanation

I am afraid this is another of FHS questions but I was not able to find more detailed explanation which I feel I need. Yeah, I know about Uni FHS and etc, but what still feels like lacking ...
2
votes
1answer
78 views

How are Unix domain sockets related to networking?

I understand that networking uses sockets as well but I am wondering if Unix domain (IPC) sockets somehow relate to network layer. If so, does this use network HW somehow? Does it work like a ...
1
vote
1answer
16 views

How can I enable tab completion for a fish function/alias?

Probably easier to just use an example here. I have a function ss that just calls sudo systemmctl $argv. Tab completion works fine with the full command, but not for the ss function. I.e., ss start ...
0
votes
1answer
12 views

Including and excluding in one regular expression

We're using HP SiteScope system at work to monitor logs and get alerts when a special string or combination of strings is caught. There is one field where the regular expression that catches the ...
0
votes
1answer
11 views

When I delete a file/folder on Windows in a Samba share - what unix commands are being issued?

Let's say I have a Samba share and a Windows client deletes a folder in it. Is it the same internally as rm -rf foldername? Is there any cleanup needed? Also is there a difference for the Samba share ...
0
votes
2answers
21 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
0answers
6 views

Convention / File Hierarchy for Compiling Source

Background: I have been compiling a lot of source code lately and I am hoping to learn of a convention to organize source code / compiled output. As an example, I have been statically compiling ...
0
votes
0answers
13 views

Approach to providing read-access to logs

We have many servers (Dev, Integration, PT etc.) and there are a lot of tomcats running on each server. Our application is divided into components and each tomcat runs with the name of a specific ...
2
votes
5answers
224 views

UNIX how to resume process using ID?

I have a problem to resume process. I tried to get process to foreground using jobs, it works, but if i close shell and start it again. In this case i haven't my process in jobs list. I know just ...
0
votes
1answer
25 views

Environment variable LC_ALL is always unset by default. why LC_ALL is unset?

Why LC_ALL is always unset by default on Linux and Unix machines? For example, on Linux: root@icubes:[~]# locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" ...
0
votes
2answers
40 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 ...
1
vote
2answers
34 views

Convert PNG to Multi-page PDF

I've seen a lot of posts about how to convert a multi-page PDF to PNG but I'm wondering how I can go in the opposite direction if I have the size of each page I want made.
1
vote
1answer
66 views

Extracting a tar.gz file returns, “This does not look like a tar archive.”

I have a tar.gz file and I want to extract it using terminal. I used following commands: tar tvzf ldtp_3.5.0.orig.tar.gz and tar -xvzf ldtp_3.5.0.orig.tar.gz. However, I get the same result for both ...
2
votes
1answer
38 views

recreating just the uid/gid unix permissions from tar

I was restoring a root partition based on a tar backup from system-rescue-cd. It went ok except the uid/gid mappings on the system-rescue-cd disk did not match the ones on this debian system that I ...
0
votes
1answer
17 views

Match unix shell promp to that of vagrant

Not sure what it's called but in vagrant when logged in as the vagrant user I get a pretty line before I run commands like so: It even says what branch i'm on in git. What is this line called and ...
0
votes
1answer
28 views

Open file using bash with unix executable

I have an application which loads using a bash script e.g /Applications/My.app/Contents/MyExecutable I can load this using bash like so "/Applications/My.app/Contents/MyExecutable" However, I ...
1
vote
1answer
30 views

Issues using scp to copy a file in Unix

I have a script where i need to get the cksum of the files in a directory from another host. I was able to do ssh to another host and create the file.txt. what i need to do now is to scp the file ...
1
vote
2answers
31 views

Terminal window scrollback buffer using screen utility

I am used to using screen on UNIX (AIX/Solaris) at work. I've installed it on my two home boxes running Ubuntu and Debian. The only difference I notice is that when I scroll up in the terminal window ...
0
votes
1answer
17 views

How to receive files on Windows SFTPd by a Unix machine

I have a Unix tool that generates files. The same tool can run SFTP commands and push out files to other machines. I have a Windows box that needs to accept files pushed out by the Unix machine. What ...
0
votes
0answers
6 views

Calculating difference between file sizes in the Unix command line [duplicate]

Want ask question about file sizes. I have same filename but different date. How I can display different of file sizes between 2 files? For example: filename_todaydate.txt: 417kb ...
0
votes
0answers
53 views

Which file system best handles multiple, concurrent write sessions: GFS2, pNFS, FS-cache, XFS or OCFS2?

Which file system can handle more concurrent write sessions; let’s say 32 write sessions: GFS2 pNFS FS-cache XFS OCFS2 The file system has to handle 32 concurrent sessions with each session ...
0
votes
1answer
21 views

Type on python script on the Unix command line (without a .py file)

Working with python 2.7, I want to do this: $> python "import Tkinter; Tkinter.tk(); etc... " but python doesn't seem to accept script this way. I don't want to create a .py file. Is there a ...
0
votes
0answers
37 views

Where is “unix:abstract=/tmp/dbus-KtyPDgWNin” socket file saved?

I try the following: roroco@roroco ~/Dropbox/rbs/ro_cmds $ echo $DBUS_SESSION_BUS_ADDRESS unix:abstract=/tmp/dbus-KtyPDgWNin,guid=ca3ea893cf45d42ef60e74d0545d84f6 But when I want to list this ...
0
votes
0answers
19 views

Why creating a process is a two-step process (fork-exec)?

I'm studying Tanenbaum's "Modern Operating Systems" book and he's explaining that: The reason for this two-step process is to allow the child to manipulate its file descriptors after the fork but ...