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

-4
votes
0answers
36 views

small help in this qustion [on hold]

I tried many time with [username]=Foxr \$. But gives error. Q: Provide an instruction to alter your prompt so that it displays the following information: (time : instruction number) [username] ...
0
votes
1answer
13 views

What is the recommended resource to refer to for syntax, usage and information about commands for an application?

What is the recommended resource to refer to for syntax, usage and information about commands for an application? I am currently trying to decide between command help (assuming that command has a ...
-1
votes
2answers
80 views

Is There any unix command that does not make any system call while executing

I have been wondering if there is any unix command that does not make any system call. For example if we take into instance ls it also uses a lot of system calls, like open, read, write. We use ...
1
vote
1answer
93 views

How can I find out the IP address from which a user logged in?

We have two RHEL 6.4 64-bit boxes in our environment. They are accessed remotely via putty. The password of user ABC on one RHEL box is shared by multiple users. User ABC logged into server from ...
0
votes
1answer
38 views

How do I run a batch file at a specific time?

I have tried using the batch and at commands with no luck. I have a batch file in a location, lets say "$DD/batchfile.batch". Here is what I have tried. batch -f $DD/batchfile.batch 10:00 today at -f ...
0
votes
2answers
96 views

What is the alternative for ls command in linux? [duplicate]

How can I list the current directory or any directory path contents without using ls command? Can we do it using echo command?
19
votes
3answers
489 views

The precedence of command options?

I know that rm -f file1 will forcefully remove file1 without prompting me. I also know that rm -i file1 will first prompt me before removing file1 Now if you execute rm -if file1, this will also ...
1
vote
1answer
43 views

error ./c.sh: line 24: [: too many arguments in shell program

I am trying to make a shell script to print the amount of time user was logged into the system but I encountered a too many arguments error. I tried many methods from the internet but none worked. ...
0
votes
3answers
33 views

How to delete files from a directory based on the contents of a gzipped tar file?

Given that I: have a directory that contains over 1000 files have a gzip'ed tar file that contains a subset of those files (x.tgz) What is the single command line (if it is possible) that will ...
2
votes
1answer
107 views

When i run “sudo su” i get --bash: command not found for everything

I'm not good with command lines nor servers. But I needed to configure for work a AMI of EC2 AWS with LINUX So I've installed a lot of stuff, moved a lot of stuff around and then I realized that sudo ...
1
vote
2answers
29 views

How do i have my script execute one more command after a previous command returns a non-zero value before it is aborted?

I have a shell script that calls on a Perl script to do some file processing. The Perl scripts exits with either a zero or one value. I have the Unix set -e command at the beginning of my script to ...
1
vote
4answers
199 views

change last 10 characters of the base (not extension) of multiple files

I have many files of different lengths but the same extension and I have tried many commands to rename all of them at once. Is it possible to change only the last 10 characters of the base of all ...
1
vote
0answers
23 views

tmux select-pane -LDUR command - disable auto-cycling behavior

is it possible to disable the behavior which cause selecting a pane on opposite side of a tmux window if there is no more pane left in a direction select-pane command was originally triggered at? if ...
0
votes
1answer
40 views

Unable to execute batch remote commands after pkill command

We've a scenario where I'm executing various remote commands at once like the following: ssh user@remote-ip " ps -A | grep java rm -rf /usr/share/tomcat/webapps/ROOT ls " The above set ...
2
votes
1answer
61 views

What does blkid stand for?

What does the command blkid stand for? I want a way to remember it. Also, what is it often used for?
0
votes
1answer
39 views

Creating an symbolic link in /bin automatically creates a second link in /usr/bin and the which command chooses /usr/bin

I just created an executable: ln -s /path/to/script.sh /bin/script then I check if everything succeeds and it does(/bin/script is created) but this has also created: /usr/bin/script and if I ...
2
votes
1answer
76 views

How prevent users from running commands via dot slash for a directory?

Does anyone know if it is possible to restrict execution of commands via dot slash notation for a directory? The environment is bash on Linux. For example, I have a directory /usr/local/app/bin. In ...
0
votes
1answer
637 views

Running program on startup (Fedora 22/ 2015)

I tried really hard to avoid posting a new question for something so basic and already answered in a hundred places, but after spending two hours on this and trying every solution out there I'm ...
2
votes
2answers
186 views

How do you add a bash script to your PATH variable using symlinks?

I run a gaming server called PocketMine. So basically I have a folder in my home directory that has a bash script to run the server: ~/PocketMine/start.sh Everytime I want to run the server I either ...
0
votes
1answer
47 views

list users who are all created by current user in linux

I have set of users with root access.I want to know list of users who are all created by currently logged in user. From below structure if user1 login to system , how to list user's like ...
3
votes
3answers
59 views

Quick change directory to a similar directory structure?

In the test environment, we have a directory structure for log files that looks like this: /var/Logs/int/app-id/region-code/log/file-name.log /var/Logs/sat/app-id/region-code/log/file-name.log ...
0
votes
1answer
70 views

What does this ls command do? [duplicate]

what does this command do if it was executed in my current working directory that has files in it? ls 2> result I think whatever ls writes will be redirected to the result file? Is that correct and ...
0
votes
2answers
133 views

“date -d” command fails on Docker Alpine Linux container

I built Alpine Linux in a Docker container with the following Dockerfile: FROM alpine:3.2 RUN apk add --update jq curl && rm -rf /var/cache/apk/* the build run successfully: $ docker build ...
0
votes
1answer
34 views

What's the inverse of the X mnemonic in chmod?

Is there a way other than find … -type f -exec chmod -x {} + to remove the x bit from u, g and/or o recursively with just chmod? The X mnemonic in chmod allows one to recursively set permissions on a ...
0
votes
1answer
18 views

run remote command to save debian package list

I'd like to backup the package list(dpkg) of some remote computers to a backup server: all of them running Debian. I already configured the rsa key to login remotely as root on the other computers ...
0
votes
4answers
147 views

Remove first 2 columns from first row of a file

I am looking for a command to remove first 2 columns from the first row of a file. The delimiter for the columns is a pipe. Number of columns vary. we just need to blindly remove first 2 columns. ...
1
vote
3answers
119 views

List of files where the line count is greater than 2

Bunch of files exist in a directory. Some files have 1 line in it, some files have more number of lines. I'm trying to display filenames from a particular directory(with full path), where the ...
0
votes
0answers
33 views

Failed to execute the iscsiadm commands

When I am using the command: iscsiadm -m discoverydb -t st -p 10.10.11.12:3260 -I be2iscsi.00:17:a4:7a:e3:34.ipv4.0 --discover -P 1 I am getting below error: scsi host1: BC_207 : MBX Cmd Failed ...
2
votes
1answer
93 views

Failed in execute of “lsscsi” command [closed]

I can't execute the "lsscsi" command in linux, I keep getting "command not found" when I try to run it. How can I solve this issue?
0
votes
3answers
199 views

Can a command be executed without a shell?

I am developing a binary executable program command to execute programs and return the output into a text field. The parameters to the command involve the command itself as it would be typed on the ...
0
votes
0answers
47 views

How to manage any command access privileges on debian linux

I am using Debian 7, and my desktop is xfce. I want to achieve managing any command on Linux. For example, executing /usr/bin/xfce4-taskmanager command would not require sudo privileges so any user ...
4
votes
1answer
523 views

ZIP files with size limit

Is there a command to create multiple ZIP files based on file size? So that in a folder of 600 files, totalling 1 GB, the command will create 4 zips roughly equal to 250mb. There's a similar command ...
2
votes
1answer
51 views

External command to force ofstream to flush

I have a C++ ofstream that, for performance reasons, I don't flush from inside the code. However, occasionally I need to inspect the file contents. Is there a Linux command that will force the ...
3
votes
3answers
73 views

When to use XPG* version of a command?

I occasionally do work on an older Solaris machine whose default version of grep is non-POSIX-compliant. This causes problems in my rc files because the default grep on the machine doesn't support ...
0
votes
0answers
20 views

Sed replace with command output [duplicate]

I'm trying to replace text with the contents of a file and I'm getting errors. This works: cat /tmp/test | sed -e "s/__TEST__/$(cat pass)/g" But this one doesn't cat /tmp/test | sed -e ...
1
vote
5answers
181 views

Difference between 'ls -ltr abc*' and 'find ./ -name abc*' command? [duplicate]

To search a file in a directory, I found two commands as below: ls -ltr initialfilename* find ./ -name initialfilename* Sometime, first command gives me the search result but sometime I used to ...
3
votes
2answers
192 views

How to check if vim is installed?

I want to know how to check whether a command is installed. Specifically, I want to alias vi to vim on all machines where vim is a valid command. And I want to keep my *rc files generic. But some ...
0
votes
0answers
27 views

How to find last x minute internet usage

How can i find out the last X minute download bandwidth in megabyte? i want to use it within a bash script.
0
votes
3answers
69 views

What is meaning of {} + in the exec command?

I want to know the meaning of {} + in the exec command, and what is the difference between {} + and {} \;. To be exact, what is the difference between these two: find . -type f -exec chmod 775 {} + ...
0
votes
0answers
13 views

What shell extension recommends packages if command is not found and how to update it? [duplicate]

I know this question might sound a little strange but i really don't know how to describe it better. On my Debian system I have a shell extension for bash that, whenever I enter an unknown command, ...
0
votes
0answers
22 views

Recover a folder just delete [duplicate]

I just delete (was my error) a folder my_folder by doing $ rm -R my_folder, how can I recover it?
0
votes
0answers
21 views

Verify par2 on different media?

Is there an easy way to point to a par2 index file in one place and have it use a different base directory for the files to verify? Here's what I'm up to: I copy a bunch of stuff to backup media. ...
1
vote
1answer
587 views

lsof: no pwd entry for UID

I'm trying to run command lsof |grep services on my Solaris 10 to find any processes that have big files which are using up the disk space but i got a bunch of lines saying: lsof: no pwd entry for ...
11
votes
2answers
1k views

What is DISPLAY=:0?

What is DISPLAY=:0 and what does it mean? It isn't a command, is it? (gnome-panel is a command.) DISPLAY=:0 gnome-panel
4
votes
3answers
318 views

Get last part of string after hyphen

Is there a simple command line to extract the last part of a string separated by hyphens? E.g., I want to extract 123 from foo-bar-123.
-3
votes
1answer
467 views

does curl -Ls 'http://pastebin.com/raw.php?i=r2jYDZaw' mean it will not output anything?

Does the s in -Ls mean that nothing should be outputted? If so what will be the output then?
0
votes
0answers
15 views

using man command for a system call close [duplicate]

So if we have an executable program called close on linux, and theres also a system call close. How can i generate a command that makes sure i get the manual for the system call "close" rather than ...
1
vote
3answers
114 views

What is the reason for having numbers within the brackets of a function ? [duplicate]

I have seen on many occasions a name of a function (frankly speaking I just call it function because of it typical appearance, they are though sometimes named commands or system calls but I do not ...
0
votes
2answers
62 views

Create own launch command in Fedora

How can I set alias for gnome-calculator so I can launch it just by typing calc. And how can I create my own command for my own application? I need it to work in this command prompt: I know that in ...
1
vote
1answer
27 views

Sort packages by size one-liner as function

While surfing web I've discovered nice one-liner that suits my needs well expac -s "%-30n %m" | sort -hk 2 | awk '{print $1, $2/1024/1024}' | column -t| However all the functional needed I got used ...