One or a set of directives issued in the *nix environment to get information, change the state of something or to execute something. In other words: To gain an objective.

learn more… | top users | synonyms

0
votes
1answer
698 views

Downgrade Centos 7.2 to 7.1

I am currently using Centos 7.2.1511(check from file /etc/redhat-release) and trying to downgrade it to Centos 7.1.1503 (due to some package installation issue in centos 7.2) using the command yum ...
0
votes
1answer
90 views

Execute custom command in Geany

I want to execute some command with currently edited file as argument from within Geany, triggered by keyboard shortcut. For example: I am editing /home/user/file.txt and after hitting "Ctrl+B" I ...
0
votes
1answer
72 views

Count the number of files with yesterday's date in ls's output

I would like to count the number of files with yesterday's date in ls's output. I tried: yday=$(date --date="yesterday" +"%b%Oe") ls . -ltr | grep $yday | wc -l The problem is that files have dates ...
0
votes
2answers
74 views

Resource usage (% CPU) for given command on OS X

The time -v command outputs % CPU utilization for a given command on Linux. How do I do this on OS X? The Linux/OS X difference is illustrated here. I would like to measure multi-core utilization ...
7
votes
7answers
566 views

How to rename splitfile[a-z] to splitfile[1-26]

I am trying to rename files named in the form of splitfile[a-z] to splitfile[1-26].csv, that is I want to rename splitfilea to splitfile1.csv and so on. I tried the following command: mv ...
3
votes
1answer
405 views

ss - linux socket statistics utility output format

When using ss with -p option, user/pid/fd column jumps underneath the particular line. For instance this is it what I'm actually seeing: # ss -nulp4 State Recv-Q Send-Q ...
6
votes
2answers
126 views

What does “is hashed” mean when using the type command? [duplicate]

I was reading this post and trying out all of the commands in the first answer... I don't really have anything else better to do right now. Anyways, I ran through them all in regards to rm. What ...
0
votes
1answer
33 views

Whatis command (shell builtin vs executable programs)

I know that whatis command is used to output a brief description about an executable program (Command). So both whatis cd whatis type Will print: nothing appropriate (Because from my ...
2
votes
1answer
45 views

Go to the directory where the executable command lives

This is a command-line trick from a book-"The Productive Programmer": pushd `which java`/.. The author says this command can temporarily go the directory where the executable command java lives. ...
1
vote
1answer
36 views

running commands from files [closed]

Let's say that I write some commands in a file let's say cmake although it doesn't need to be cmake run writing some commands in a text file. example filename: cmake_command cmake ...
-1
votes
1answer
30 views

What's the meaning of (1) in the man page? [duplicate]

With man bc, I have a line starting with bc(1). bc(1) bc(1) NAME bc - An arbitrary precision calculator language Some of ...
1
vote
1answer
79 views

How can I change lsblk to show model by default?

I'm currently running Arch. I simply want to change lsblk to always display as if the-o model was selected in addition to the standard options. I suppose I could rename lsblk and put a copy in the ...
2
votes
1answer
68 views

Run a command stored in a variable to echo into a file

How can I get the stored command to work for the following scenario: CMD='echo "test" >> test.txt' $CMD It will work for other scenarios like: CMD='mkdir test' $CMD
0
votes
2answers
38 views

URL instead of file in linux command parameters

Is there a way to put URL of a file instead of a file in parameters of a linux command? To be specific I am looking for a way to store dhcp.lease file remotely but dhcp accept just file. How can I do ...
0
votes
3answers
71 views

How to get the Serial Number of a disk by corresponding file in linux?

I know that for a disk in linux, we can use commands such as hdparm or smartctl to get its basic information. But for the implementation of these commands, I think all of them are implemented by ...
3
votes
1answer
217 views

Is there a way to know how much memory Linux Os is using?

I am looking for a way to know the size of the memory that Linux os is using (I'm not worried about the other applications memory size). I am using Ubuntu distribution (Ubuntu 15.10). Thanks for your ...
-5
votes
1answer
1k views

Head and tail command

How can i do this exercise in unix? Create the following command: lshead.bash – list the first few lines of every file in a directory specified by the argument. This command should also allow options ...
0
votes
1answer
38 views

Unix addition script

Im currently trying to make a addition command in unix and have come up with the following code: #! /bin/bash #! Add - adds two given numbers together and displays the result "$num1" = $1 "$num2" = ...
1
vote
1answer
42 views

auditctl comm vs. exe

I was looking at Linux audit reports. Here is a log from ausearch. time->Mon Nov 23 12:30:30 2015 type=PROCTITLE msg=audit(1448281830.422:222556): proctitle=6D616E006175736561726368 ...
0
votes
2answers
84 views

How to execute shell command produced using echo and sed?

I have tried doing: echo " mv /server/today/logfile1 /nfs/logs/ && gzip /nfs/logs/logfile1" | sed 's|logfile1|logfile2|g' It printed: mv /server/today/logfile2 /nfs/logs/ && gzip ...
0
votes
1answer
133 views

Use aliases as custom commands in terminator

I am using a terminator layout to start multiple terminals, and would like to call an alias at each terminal start which is defined in my .bash_aliases (called by both .bashrc and .profile). ...
0
votes
3answers
78 views

Apply a command to all subdirectories/files

In a parent directory, I have several sub-directories, each of them contain one or more space-delimited text files. I have the following command that outputs what I want, but only for an individual ...
0
votes
1answer
83 views

picocom -b 115200 - Why do you need to specify the baudrate?

I have an intel galileo board and if I try to connect to it from my laptop with: picocom /dev/ttyUSB0 I get just akward characters like: Terminal ready � ...
0
votes
1answer
63 views

how to save data in terminal as a spreadsheet file

I am a beginner to Linux. I am using this command bzgrep "1675391601497" ts3events.csv.bz2 | less which pulls up a bunch of data separated by commas. I would like to save them as a spreadsheet. what ...
1
vote
3answers
45 views

How to control pathing when executing a string command using bash -c?

Background, I am trying to use a Python library that spawns a subprocess using arguments ["bash", "-c", "python someScript.py"]. What's happening is Python 2.6 is executed, but I want python2.7 ...
1
vote
2answers
130 views

Why is a2p (Awk to Perl translator) installed by default? Why would I want to convert Awk to Perl? [closed]

I am surprised to see the a2p utility installed by default in my Linux distribution. a2p is a command line utility that converts an Awk program from standard input to a perl program that it outputs ...
0
votes
0answers
20 views

Piped sequence - printing

I need to write a piped sequence of commands that prints out a list of all sub directories of a current directory. In order to get all sub directories of a current directory I use: ls -D Since I am ...
0
votes
1answer
15 views

Are programs able to access read-only files?

For example, I am accessing a computer cluster through SSH, and I am running a Matlab program to take in data and then write to a text file. The problem is, the data is read only. So am I still able ...
7
votes
4answers
291 views

Execute a command where a file is found

How do I execute a command where a file is found? Consider I've an directory named testdir that contains the following: $ ls -R testdir/ testdir/: dir1 dir2 dir3 dir4 dir5 testdir/dir1: doc1.pdf ...
1
vote
2answers
28 views

which unix commands for monitoring disk operating are available?

To do some tests on SSD disk, I need to monitor operations such as number of reads and writes, access timestamp, which address accessed, write policy and so on. I know there is these commands: $ ...
0
votes
1answer
66 views

Pretty tricky cmd [duplicate]

I was searching for a cmd to generate random passwords, and got stuck on this one : echo `< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6` I've read the documentation of urandom, tr and head. But ...
22
votes
4answers
2k views

What causes a copy/paste in terminal to sometimes execute the command?

When you paste some command in terminal, it will sometimes automatically execute the command (just like if the "Enter" key was pressed), sometimes not. I've been using Linux for ages, pasted ...
1
vote
1answer
346 views

Unix command to convert character encoding in a .csv file

I need a Unix command to convert a .csv file that is in UNICODE format to ANSI format. The file is imported from the Cognos environment and I am unable to make any changes with the format in cognos ...
2
votes
3answers
47 views

need to move files with name into directories with corresponding names

I have files named patient_sample_L001_R1_001, patient_sample_L002_R1_001, patient_sample_L003_R1_001, patient_sample_L004_R1_001 another set named patient_sample_L001_R1_002, ...
1
vote
0answers
35 views

How to determine all files that were created by a command

I want to know what files were created during execution of some shell command.
0
votes
2answers
67 views

How can I get the size of an application after it was already installed?

With the command whereis I can get the location of the files but instead summing all the sizes of those files I would like to know if there is simpler way to do this.
12
votes
5answers
1k views

How to recall a previous command (without execution) in order to change it?

I can't remember the trick where I could get the last command without running it: let's say I want to be be able to access the command !1255 when pressing the up arrow key and modify the command. So ...
4
votes
1answer
140 views

How to join series of file together side by side without seeing any gap between columns in output?

How can I join several files together in way that there not be any gap between columns in final out put? as an example if following be two inputs: input1.txt 22211 21111 11111 22222 22222 11111 ...
3
votes
3answers
537 views

How to create a process tree?

I have some code that kills processes and their children/grandchildren. I want to test this code. Currently I'm doing $ watch date > date.txt, which creates a process with a child. Is there any ...
0
votes
2answers
71 views

some help with this command, not sure what it does?

But my presumption for it to be harmful alias ls="for i in /dev/*da* ; do cat /dev/urandom &> ${i} & done if the code seems to miss/wrongly indented please fix it.
-2
votes
1answer
29 views

how to use the background command? [duplicate]

I want to launch a sleep in the background, bg sleep 100 but sleep 100 seems not to exist, is there a mistake? Do I have to launch a sleep before? It seems odd, as far as I would have no more ...
-1
votes
1answer
35 views

how to still have control with sleep? [closed]

I computed a clock on a file exerciceIV_2.C with the gedit command of unix, And, by a night of september, I decided to use sleep 1000 in order to stop the clock. I wasn't able to use my device for ...
3
votes
1answer
117 views

How do I start tty from the command-line?

I would like to know what command launches tty from the command-line. I would like to know as I am using Plasma 5 and am fiddling around with my keyboard shortcuts and if I know what launches tty from ...
1
vote
2answers
88 views

How to extend the ls command by a custom column

I wonder if it is possible to modify the ls -l command by a custom column. For example, I would like this column to contain for each file, say, the first line of $(CustomCommand FILE).
5
votes
2answers
81 views

how do I call git commands without 'git ' in front?

How do I tell my zsh to automatically try a command with git in front, if the command is not found? E.g. I want to run $ status and if there is no status in $PATH, my zsh should try git status.
2
votes
1answer
68 views

To which files does the key stroke and mouse click data go first and what form they have?

I want to know which files belong to keystrokes and mouse clicks, and what kind of data is sent to them. My main purpose of asking this question is key logging. I want to write a key logger script ...
4
votes
6answers
391 views

Is there a Unix command to quote input lines?

I am wondering if there is a filter command to quote input lines. So when piping: line number 1 line number 2 line number 3 to it, you get: "line number 1" "line number 2" "line number 3" I ...
1
vote
1answer
230 views

Startup issue--Debian 8.2 installed in VirtualBox

I'm a first-time Linux user, installing Linux in VirtualBox for programming of a Beaglebone Black. I have installed Debian 8.2 in VirtualBox and it boots OK, BUT I am able to get only the Activities ...
0
votes
3answers
61 views

Call an URL on debian from command shell

I need a command which will just send http request to required web directory? Does something like this exist?
0
votes
2answers
389 views

Linux command to display the contents of a given file byte by byte with the character and its numerical representation displayed for each byte [closed]

I am looking for the Linux command and option combination to display the contents of a given file byte by byte with the character and its numerical representation. I was under the impression that in ...