The command tag has no wiki summary.
0
votes
4answers
93 views
Can I have the shell ignore the command line sometimes but not always?
For debugging purpose sometimes I access a remote Linux box via VNC. At that time someone else may be working on that same Linux box through VNC and it may happen that I do not have facility to chat ...
1
vote
1answer
18 views
AIX cifs hostname with underscore
I am trying to type this comand but for some reason it takes the first and not the second version.
I have entered both the host names in the host file, FYI.
This command works (hostname zq13c1):
...
60
votes
15answers
10k views
What are the legitimate uses of the `touch` command?
What's the point of the touch command? I know I can create empty files with it, but so is also the case with echo -n.
Otherwise, why would someone need to change the timestamps of a file? Unless to ...
4
votes
4answers
90 views
How to randomly sample a subset of a file
Is there any Linux command one can use to sample subset of a file? For instance, a file contains one million lines, and we want to randomly sample only one thousand lines from that file.
For random ...
1
vote
1answer
29 views
Linux - How to open a console and display command results on startup?
I have a Linux server with a screen always displaying the end of a very usefull file.
How could I automatically enter a shell and display the end of this file when the server starts?
I'd like to do ...
1
vote
1answer
19 views
Mysql import the most recent file from a directory
I have a directory with daily backups of my entire MySQL database.
I want to import the most recent backup into the database.
I know to import a backup I need to use mysql -u root -ppasswordhere ...
4
votes
1answer
178 views
Which 2-letter POSIX command is different from all the others?
I was interviewed for an internship and I got the same question as this one: http://www.glassdoor.com/Interview/Which-2-letter-POSIX-command-is-different-from-all-the-others-QTN_498236.htm
The ...
2
votes
3answers
105 views
What does “rm is hashed” mean?
I'm going through http://mywiki.wooledge.org/BashGuide/CommandsAndArguments and came across this:
$ type rm
rm is hashed (/bin/rm)
$ type cd
cd is a shell builtin
Just a little earlier, the guide ...
7
votes
2answers
103 views
what is `env <command>` doing?
What is the command env ls -al doing?
I had a Linux test and there was question: "How to run command directly, but not its alias?"
I knew that there exists solution like prefixing command with some ...
1
vote
1answer
91 views
What is the extended version of the “sl” command?
Recently I've been discussing Unix humor with a friend and we got to the topic of the sl command. I got the sources, compiled, installed on our development machine, and... got rather disappointed. The ...
4
votes
1answer
57 views
What does `init [2]` mean in the COMMAND column of ps?
Reading What do the brackets around processes mean? I understand that the executable name is printed.
Linux ps man page:
Sometimes the process args will be unavailable; when this happens, ps will ...
3
votes
3answers
116 views
Correctly parse arguments in script behaving like a shell called through SSH
I have a server with a very limited used whom I want to be able to run two very specific (and custom) instructions through SSH. In order to do that, I have set the shell for that limited user to be a ...
2
votes
1answer
40 views
command not found handle doesn't work for url
I'm trying to setup the command_not_found_handle for URL links,
%> command_not_found_handle() { echo "OK"; }
%> aaaaa
OK
%> http://www.google.com
bash: http://www.google.com: No such file or ...
1
vote
2answers
60 views
Using globbing/wildcards when Opening Files from Terminal
I have a folder A. Inside the folder, there are some files a,b,c,d and there is a subfolder, B, containing files e,f,g.
Suppose I want to open files a,b,c,d: then I just type xdg-open *. However, ...
3
votes
2answers
195 views
what is the meaning of this sed command?
sed -e 's/72;/72, next_val = 0x11111111;/;/@/{h;s/test/next/g;x;G}'
fmt_vuln.c > fmt_vuln2.c
could you tell me about what is the meaning of ;/@/{h;s/test/next/g;x;G}?
13
votes
1answer
453 views
What does yes $(yes yes) do?
Wondering what use the yes command might be, I stumbled upon this comment, and tried to execute
yes $(yes yes)
From what I understand, this should simply print out an infinite sequence of yes, but ...
3
votes
2answers
157 views
print command instead of echo in linux
I simply can print a message in terminal using linux echo command.
prayag@prayag$ echo "prayag works on JVM"
prayag works on JVM
Can I have the same output with print command.
I actually went ...
7
votes
3answers
153 views
Difference between sudo -i and sudo su [duplicate]
I was wondering what the difference is between sudo -i and sudo su?
2
votes
2answers
90 views
How to list groups with gid in redhat?
I first listed the groups using :
groups
I added group using
groupadd -g 300 oinstall
groupadd –g 500 dba
and then when I do
groups
root bin daemon sys adm disk wheel sfcb
I am unable to ...
0
votes
1answer
71 views
Unable to execute command in the Linux with an user
Two scenarios here.
Sudo rights are given for a particular group.
a. A new user is created and is assigned to the group. b. Using this user, when we execute commands via shell script it is unable to ...
1
vote
1answer
22 views
Linux Red Hat Library Dependencies question
I have to create a script that will download 8 libraries. However, on the server where we have all the libraries, I can only find 2 or 3 of these 8.
I believe these 2 or 3 actually depend on other ...
1
vote
4answers
115 views
How can I force the use of a specific binary when running a script
How can I force a specific binary to be used when executing a bash script?
I have a bash script which uses the "php" binary.
There are several php versions on my computer. The main php binary, as ...
0
votes
1answer
196 views
Linux Mint XFCE, command to launch menu
What is the command that launches the whisker menu in the Linux Mint xfce edition. For another distribution that used xfce it was xfce4-popup-whisker menu but that doesn't seem to work. I would like ...
0
votes
1answer
36 views
In which way is a commented line active in a program file?
To solve the bug reported here the solution seems to be commenting, not just adding a certain line in a file - as explained here and here.
That is - to make that bug disappear in Xfce, a certain line ...
1
vote
4answers
113 views
List all commands that a shell knows
What can I type at my shell (which happens to be bash) that will list all the commands that are recognized?
Also, does this differ by shell? Or do all shells just have a "directory" of commands they ...
0
votes
2answers
100 views
I used the move command and all files disappeared [duplicate]
I was moving all data to another folder and made 1 mistake and run this commmand
mv * /*
all files have disappeared now.
How can I find them? Or are they deleted?
2
votes
3answers
241 views
Difference between 'ifconfig' and 'ip' commands
I read some articles/tutorials on 'ifconfig' command, most of them included a common statement -
"ifconfig is deprecated by ip command"
and suggested to learn ip command. But none of them ...
0
votes
2answers
56 views
The -cp option to the java command [closed]
java -cp FILE.jar FILE.Main inputfile
What does the -cp option mean? For that matter, what a negative sign in front mean? I've searched everywhere and couldn't find the answer.
0
votes
2answers
104 views
What is the Run prompt equivalency in Linux?
In Windows, there is the Run prompt, which you can access with Win+R key.
What is the equivalency to this in Linux? Is there even such a thing or is the Terminal the main prompt you would use in ...
1
vote
3answers
152 views
what is “play” command/package available by default in Linux Mint and how to remove it
I'm trying install play framework on Linux Mint and setup its variable:
export PATH=$PATH:/relativePath/to/play
But command can't run because it's being overlapped by another play command which was ...
1
vote
0answers
38 views
Using alot MUA with nottoomuch-addresses
I try to use the MUA alot to work with the nottoomuch-addresses.sh script for autocompletion of addresses within alot like described in: ...
4
votes
3answers
94 views
How to find a file with specific permission of a specific user?
How do I get a list of all the files which permission is "read and write" for a specific user.
For example, when I go on the desktop of my mac, then right click on file "A", then "get info", then on ...
2
votes
2answers
93 views
Memory usage command with syntax similar to the time command
What command shows the memory usage of a program, i am looking for a command that is simple to use and has similar syntax to the time command. I am trying to find the memory usage of a md5 hashing ...
4
votes
1answer
127 views
What does the command “$()” do in UNIX?
What does the command $() do in UNIX? Could someone explain what is the significance of $ in the below examples;
$(echo var=10)
and
eval $(echo var=10)
0
votes
1answer
117 views
How to run a shell command in a server?
I am fairly familiar with computers and web stuff but this is a bit out of my comfort zone.
I have a shell script (.sh file) I want to run in a Linux server I have one site hosted (the script is a ...
1
vote
1answer
85 views
Execute command supplied by function parameters
I'm trying to create a function method in a bash script that executes a command which is supplied to the method by the paramters.
Meaning somethings like this:
special_execute()
{
# Some code
...
10
votes
5answers
1k views
Delete 100 lines from vi editor using single command
I am using Ubuntu and trying to delete all 100 lines from vi editor but I got interview question of doing this in one command.
0
votes
4answers
437 views
How to create custom commands in Unix/Linux? [closed]
I'm a newbie in Unix/Linux environment. Can anyone guide me to create custom commands in Unix/Linux. Thanks in advance
1
vote
1answer
63 views
Find if a process terminates in a specific amount of time
I am running a program.Inside this program i run a specific command and i use ulimit command to terminate the running of that command if it exceeds an amount of time.To be more clear i run this:
...
1
vote
1answer
121 views
Bash command that uses wildcard in place of folder to copy folder contents of multiple files into one directory?
I have a directory ~/dir that contains a bunch of random folders like: ~/dir/av 801 and ~/dir/lm 320. I want to copy the contents of every inner folder (ie: av 801) into a different directory. The ...
0
votes
1answer
52 views
How can I see the rate of my wireless card?
I am setting manually the bit-rate of my wireless card !
sudo iwconfig wlan0 rate 54M
Where can I see if it is applied, because the command does not give any feedback !!!
4
votes
4answers
302 views
What does <<< mean? [duplicate]
What does <<< mean? Here is an example:
$ sed 's/a/b/g' <<< "aaa"
bbb
Is it something general that works with more Linux commands?
It looks like it's feeding the sed program with ...
0
votes
1answer
82 views
Command “I'm” on linux ubuntu [closed]
I'm new at linux, ubuntu,
and I did type I'm running and then like if it was a program or
something else, I was allowed to write more...
nothing else... I just want to know more about this command ...
-1
votes
1answer
87 views
can't view `split` output files with cat [closed]
File a.txt contains:
1 one
2 two
3 three
4 four
5 five
6 six
Then the command: split -2 a.txt output_ yields as output three new files output_aa, output_ab, output_ac
When I type: cat output_aa I ...
21
votes
3answers
3k views
Why is dmesg called dmesg?
Is there any explanation/history behind the name of the command dmesg (which prints out some kernel messages)?
0
votes
0answers
138 views
I want to use the command 'shutdown -r now' in Lazarus
I want to use the command shutdown -r now in Lazarus, but I don't know how to do it. Any tips or examples that you can give me I would be most grateful.
8
votes
0answers
202 views
how to get exit status from the command before the last [duplicate]
I have solaris machine ( solaris 10 )
please Look on the following simple commands (haconf -makerw | grep -iq "Cluster already writable")
# haconf -makerw
VCS WARNING V-16-1-10364 Cluster ...
0
votes
2answers
114 views
'df' command doesn't list /home directory
In the book I am reading, the output of df command is shown like this:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 15115452 5012392 9949716 34% /
/dev/sda5 59631908 ...
1
vote
1answer
104 views
How to find packages only which package name equal to text with aptitude?
When I want to search a package which named 'z', aptitude find packages which contains 'z' in package name same as 'like' in SQL, so aptitude find a lots of packages.
How can I search packages which ...
0
votes
3answers
288 views
Find executable files recursively
I have got the directory called Test and a few directories inside it. Both Test and the directories inside it have executable files. I'd like to print them with ls. I'd use this command.
ls -l `find ...