0
votes
1answer
15 views

vi Error | Out of memory saving lines for undo - try using ed

While executing the following command on a large file: vi largeFile.log I get the following error: Out of memory saving lines for undo - try using ed My environment is: AIX6 I cannot add any ...
0
votes
1answer
35 views

Piping tail -f into awk

Greeting, I am trying to pipe tail -f into awk to monitor a logfile in realtime, but according to examples, there should be not problem but I can't get it to work. here is the command I'm running ...
0
votes
2answers
21 views

File sorting confusion

Q1. I have a command and I'm confused why it's sorting the filesizes by Kilobytes then Megabytes? $ find ~ -maxdepth 1 -size +1024c -type f -exec du -h {} \; | sort -nr 80K /home/sl6/S3401636/Lab 4- ...
0
votes
1answer
16 views

7z commandline: test archive and only show failures?

What is the easiest way to get only the failures from 7z when testing an archive for integrity? Looking at the command-line options, there seems to be no verbose or non-verbose option (i.e. there ...
0
votes
0answers
21 views

Getopts - command with multiple options

I have a command script i'm making and wondering how do i go about combining multiple options the general usage of the command is as follows: Usage: myCommand [-fpr] [-n count] [-s size] [-u user] ...
4
votes
3answers
46 views

Using Unix's find command to find directories matching name but not subdirectories with same name

Edited: I mistakenly misrepresented my problem. A more accurate example now appears below. I'd like to recursively walk all directories inside a target directory, and stop each recursive call after ...
0
votes
0answers
27 views

OpenBSD Change tty background color

Is it possible to change the background color of one or all ttys without installing any additional packages? Using a config file, or environment variable? I tried changing the text mode resolution, ...
1
vote
1answer
73 views

Unix Command to get number of lines in a csv file

Hi Iam new to UNIX and 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 iam ...
0
votes
3answers
49 views

How to exec two commands in one find

I would like to find specific folders echo their name ls -l their contents My problem is that I don't know how to combine an echo {} and an ls -l {} in one find command. line for echo: sudo ...
0
votes
0answers
16 views

Exporting Variables – Reading Them Returns Blank?

Hi – I'm using Mac OS X (Mavericks), which should be UNIX compliant. In my .bash_login, I'm exporting variables for Cocos2D-X. I know this is executing, as I have a 'echo Test' line that executes ...
0
votes
0answers
24 views

Zsh prompt produces an error

I have the default prompt for oh-my-zsh, which is great when I have a git repo, but if there is no git repo its actually failing instead of putting nothing. I trapped an ascii image to err just for ...
2
votes
1answer
33 views

*nix find -type flag: can it accept multiple types?

I want to use find for getting all simlinks and regular files. I can use the -type for these individually, and I can use -o to string them together, but I apparently can't do -type fl. Is there a way ...
2
votes
1answer
85 views

How can I log all my command-line activity?

I just had a Heisenbug that completely disappeared on me. I'm convinced that something funny must have happened when I compiled my program several days or a week ago. But sadly, my Windows (MINGW) ...
4
votes
1answer
43 views

Unix /Linux show the last part of a file with line numbers

Is there a way to make tail show a line number in front of the last lines it show so that it show the growth of the file when using it in a script. e.g: when using it in a script like this one: ...
1
vote
4answers
55 views

Remove all folders that does not contain a specific name in UNIX

I'm trying to figure out my old skill in *nix. What I'm trying to achieve is to remove every folders that does not contain a specific word. This is the listing ➜ myfolder: pwd /user/myfolder ➜ ...
0
votes
1answer
44 views

Is there a free UNIX shell service that allows you to test function keys?

I am testing a program that is a terminal emulator that runs through a web browser. I'd like to use a free UNIX shell service to test the function key maps (this program can also generate a function ...
0
votes
3answers
283 views

Copy a list of files preserving directory structure, without scripts

Is there a way to copy a list of files, that share a common base directory, preserving their relative directory structure? The files with relative paths are listed in a text file. edit I have the ...
1
vote
1answer
122 views

Move all files in sub-directories to current directory while renaming duplicates

I have a number of subdirectories and I would like to move any files contained therein to the current directory using a one line Terminal command on the Mac. I know that my file names are not all ...
1
vote
1answer
110 views

How to remove files which are copied after running `make install`?

So the question is how am I supposed to uninstall or remove the files that has been installed after running the make instal? (Specially when I stop it in the middle of the process by a "Ctrl+C" or ...
0
votes
2answers
43 views

What is the difference between different “make” commands?

So after running configure file on source codes for different applications one enters make and make install to install the application. My question is what is the difference between make and make ...
1
vote
2answers
87 views

How to use 2x$$ together linux

the questing is how to use two variables togheter.. ex. $1,$2,$3 are set numb=2 I need to use command: head $$numb that must be the same as: head $2 I tried everything, I need to know what ...
1
vote
0answers
169 views

Enable ssh service from command line (single user mode)

How can i enable the ssh service in the single user mode? I know how to do it in Terminal: systemsetup -setremotelogin on How can i do it in the single user mode? And if i reboot the system that ...
0
votes
1answer
92 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
4answers
89 views

Efficient system exploration/navigation on Linux?

I've been using unix and the command line for some time already, but my main method for navigating through files and directories is still cd path; ls; cd path; ls.... This is not effective at all. ...
0
votes
2answers
100 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 ...
1
vote
2answers
490 views

find command: search for files owned by many users in one command

In Linux, is there a way to do a search for files owned by multiple users (or group(s) of users) with the "find" command? Something like this? find . -user john, akido
1
vote
1answer
243 views

Entering into multiple directories in Unix and deleting a particular file

I have a list of directories that I want to go into and delete particular files. For example, the directory names I have are as below: 091513 090213 082612 071611 020908 011009 ... 062308 Each of ...
0
votes
1answer
41 views

DIff ignore arguments from a file doesn't seem to be working

When I run the following command, it doesn't seem to be ignoring what I specify in the ignore.txt file. I have tried adding some of the arguments with -x, but there are way too many to do that by ...
1
vote
3answers
161 views

Running a script where you append the errors to file and use nohup

The script works! First I type this in my CLI: php worker.php >>/home/xxx/log 2>&1 Then, I want it to run as its own process or whatever, so I add an & at the end, like this: php ...
2
votes
1answer
120 views

How can I apply cat (UNIX) command individually, to all files in a folder?

Here's the situation: My file A.csv needs to be concatenated individually with all the other *.csv's in the folder and each of the outputs needs to have the same name as the particular *.csv. How ...
0
votes
4answers
105 views

Replace word in file - UNIX command

How can I replace 'word' on my file for a counter: {"word":"resolucion","count":40723},{"word":"general","count":20976}, {"word":"","count":13334},{"word":"publica","count":12379}, ...
1
vote
2answers
356 views

Using Piping with cat and less to concatenate 2 files

I'm fairly new to Unix commands and I just have a simple question. One exercise I'm working on wants me to use piping along with cat and less to concatenate 2 directories (in this case /etc/passwd ...
-2
votes
1answer
194 views

changing ownership of files within a bash script

I have this bash script which outputs the first two files as owned by user, and the next three as owned by root: ################################################## # Variables NUM="6" #number of ...
2
votes
1answer
67 views

Is it possible to check which stream is used by the command? (bash)

I have an irritating problem: redirecting stderr does not work. I get: iptables: Chain already exists I can't be bothered to check if a chain exists already (pointless, iptables just throws an ...
1
vote
4answers
1k views

How can I stop cat output immediately despite massive output?

I'm looking for someway to stop the output to STDOUT when I realize a command is wrong. For instance, if I accidentally cat a very large file. Usually it will eventually stop if you hold down ctrl + ...
1
vote
1answer
87 views

Linux command find -print. When to I need this option?

What is the difference between: find . -name "*.txt" and find . -name "*.txt" -print ? I mean what is the use of print in find. I see that it prints the results anyway so why is this option ...
1
vote
1answer
1k views

Unix commands to get last modified date and size of file/folder (NOT LS)

I need a command that retrieves the last modified date and another that gives the size of a file. I've looked everywhere, and I cannot find commands like this. LS will not work.
16
votes
5answers
4k views

Is there a way to display a countdown or stopwatch timer in a terminal?

How can I display a real-time countdown timer on the Linux terminal? Is there an existing app or, even better, a one liner to do this?
3
votes
2answers
798 views

Efficient way to search string within file find and grep

I am searching all files containing a specific string on a filer (on an old HP-UX workstation). I do not know where the files are located in the file system (there are many directories, with hudge ...
2
votes
4answers
393 views

execute a command in all subdirectories bash

I have a directory structure composed by: iTunes/Music/${author}/${album}/${song.mp3} I implemented a script to strip my mp3 bitrate to 128 kbps using lame (which works on a single file at time). ...
0
votes
1answer
283 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 ...
1
vote
1answer
121 views

Is there replacement for split in Windows? [duplicate]

I want to split a large file ~9 GB by lines, I know split command in UNIX but is there a similar command for Windows?
0
votes
1answer
97 views

Is there colorizer utility that can take command output and colorize it accordingly to pre-defined scheme?

I already know that I can colorize output with grep and with a couple of different ways. I want to have something like supercat, but for commands (and not that dead). The application Supercat ...
1
vote
0answers
266 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
87 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.
0
votes
0answers
177 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
1answer
88 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
160 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 ...
3
votes
2answers
115 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?
5
votes
3answers
613 views

List file range with UNIX wildcards

Say for example I have the following files in my working directory: mjk0001.fits, mjk0002.fits, ... numerically increasing all the way to mjk9999.fits. Is there a way to use UNIX wildcards to list or ...