Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Results tagged with unix
Search options not deleted
user 151431
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.
1
vote
Unix: copy files sequentially
I'm not sure what you mean, that is the default behavior of the copy command (cp):
Copy many files:
cp *txt *jpg destination_dir
Here are some examples of more complex operations:
Copy all fil …
1
vote
Best way to edit certain system files without sudo
Another option is to open a new terminal and switch to root. Depending on how your system is set up you will be able to do this using one or more of the following ways:
sudo su
sudo -i
su
Once you …
11
votes
Single-line input to multiline output in Unix
Here's a couple:
fold
echo "Hello there" | fold -w 1
H
e
l
l
o
t
h
e
r
e
Perl
echo "Hello there" | perl -pe 's/(.)/$1\n/g;'
H
e
l
l
o
t
h
e
r
e
1
vote
File rename in batch in Unix
If you want to rename many files, do something like this:
for f in *Prd*;do mv "$f" "${f/Prd/Ppt}"; done
This will go through all files whose name contains Prd in the current directory and rename t …
6
votes
Accepted
how can I sync Date time in two computers?
The best solution would be to install NTP on both machines and have them sync to the same server. This is not an option, of course, if you only have root access to one of the two.
Assuming that you ha …
7
votes
Accepted
force copy when -i is used in bash alias
There are many ways of doing this (taken from here):
the full pathname of the command: /bin/cp -f source_file dest_file
command substitution: $(which cp) -f source_file dest_file
the command builtin …
0
votes
extracting words using awk
I could give you a pure awk answer if you post an example of your actual data. In the absence of specific clues, you can always try Perl:
perl -ne '/FG=(\d+)/; print "$1\n"' infile.txt > outfile.txt …
5
votes
Accepted
unix sytem-access
Um, yes. That's what group permissions are. The way you have it set up now is:
d rwx rwx r-x
- --- --- ---
| | | |------> Everybody can read(r) and execute(x)
| | |
| | |----------> All gr …
1
vote
Adding default arguments to Google Chrome
Just make chrome an alias. Add this line to your ~/.bashrc (you can do similar things for other shells of course):
alias chrome='chrome --auth-server-whitelist=*'
Then either source ~/.bashrc or ju …
0
votes
How to map Alt+Tab behavior to another keyboard combination?
on the Unix machine edit the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml and change this line:
<property name="<Alt>Tab" type="string" value="cycle_windows_key"/ …
2
votes
Accepted
Replace string with another string shell script
I am sure you can also do this in sed but it is much easier for me in Perl:
perl -pe 's/([^,])\"/$1xxx/g; s/xxx,/\",/g; s/xxx/\"\"\"/g' data.txt
EXPLANATION:
perl -pe : execute the script given o …
2
votes
Is chmod 060/006/066/etc... useful?
You can always imagine possible scenarios. For example, 060 (group has read/write access and no one else can do anything) could be useful if you have a webserver creating a file but you don't want it …
0
votes
Executing multiple awk commands in one file
All you need is a one liner, no script file is necessary:
awk '/FUELHH/{print > "fuelhh.txt"}/FUELINST/{print}' datafile > fuelinst.txt
99
votes
Accepted
Understanding top command in unix
All this information is available in the top man page which you can read by running man top. Here is a breakdown:
The CPU(s) row shows:
CPU state percentages based on the interval since
the last re …
3
votes
Filter file when a column is in whitelist
There are many ways of doing this. Here are a few but use the Perl one it is orders of magnitude faster. I include the others for the sake of completeness:
Perl and hashes, ridiculously fast
perl …