pastebin - collaborative debugging tool
nixav.kpaste.net RSS

Difference between
modified post fd8620 by Anonymous on Tue 20th Jan 2015 20:31
original post 7cd by Anonymous on Tue 20th Jan 2015 00:44
Download diff
Show old version | new version | both versions

    
11
# How do /r/linuxers share custom dotfiles?
22
http://www.reddit.com/r/linux/comments/1j7y7x/how_do_rlinuxers_share_custom_dotfiles/
33
44
# Logcheck, be lazy with checking logs
55
http://logcheck.org/
66
https://www.youtube.com/watch?v=1QgbnK45IRg&feature=player_detailpage&list=PL170C8C4DDB2961B2&t=2999
77
https://www.reddit.com/r/homelab/comments/2fgt30/monitoring_logs_with_elk_logstash_kibana/
88
99
## Network monitoring
1010
# Pretty Ping!
1111
http://www.reddit.com/r/linux/comments/1op98a/prettypingsh_a_better_ui_for_watching_ping/
1212
# Other
1313
https://www.reddit.com/r/linux/comments/2s1q28/useful_commandline_network_monitors_on_linux/
1414
1515
# How to run a process on a specific core
1616
http://xmodulo.com/2013/10/run-program-process-specific-cpu-cores-linux.html
1717
1818
# How to kill process
1919
http://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-process-in-unix-or-linux-systems/
2020
2121
# How to roll out your own Debian distro
2222
http://www.staldal.nu/tech/2011/12/11/how-to-roll-your-own-debian-based-linux-distro/
2323
2424
# Linux 2FA
2525
http://www.reddit.com/r/linux/comments/2b4u4n/2_factor_authentication_backup_2fa_software_for/
2626
# OTP (GAuth) @ CLI
2727
http://otp.readthedocs.org/en/latest/
2828
2929
# Run stuff collaboratively on a server.
3030
http://www.reddit.com/r/sysadmin/comments/tqo7b/til_rundeck_is_a_great_tool_to_run_commands/
3131
3232
# Generate random strings
3333
http://www.howtogeek.com/howto/30184/10-ways-to-generate-a-random-password-from-the-command-line/
3434
3535
# twander file manager
3636
http://www.reddit.com/r/linux/comments/1ydl8t/pcman_file_manager_120_gets_separated_desktop/cfjuw9u
3737
3838
# Why u no open hardware :(
3939
http://www.reddit.com/r/linux/comments/20zg0h/first_ubuntu_tablets_to_launch_this_autumn/cg86z25
4040
4141
# About docs
4242
http://www.reddit.com/r/linux/comments/24jzyg/well_thats_a_super_helpful_installation_error/ch887pw
4343
4444
# Pipe through Internet!
4545
http://www.reddit.com/r/linux/comments/24uyqo/til_you_can_pipe_through_internet/
4646
4747
# LUKS data encryption
4848
http://www.reddit.com/r/linux/comments/2bgnwp/encrypt_your_data_using_luks/
4949
5050
# cgroups
5151
http://lwn.net/Articles/603762/
5252
5353
# Persistent (full?) install linux on usb for multiple computers with little to no damage? (self.linux)
5454
http://www.reddit.com/r/linux/comments/2gqovx/persistent_full_install_linux_on_usb_for_multiple/
5555
5656
# 3D filesystem browser
5757
https://www.reddit.com/r/linux/comments/2hky9x/tdfsb_3d_filesystem_browser/
5858
5959
# IPcalc
6060
http://jodies.de/ipcalc
6161
6262
# Photoshop on Linux
6363
https://www.reddit.com/r/linux/comments/2nbe8y/it_can_be_done_photoshop_cs5_on_linux_with_wine/
6464
6565
# Data recovery
6666
https://www.reddit.com/r/linux/comments/2ov9tu/safecopy_recover_data_from_corrupt_media/
6767
6868
6969
7070
7171
[[[ General resources & Blogs ]]]
7272
7373
http://www.reddit.com/r/linux/comments/21rm3o/what_is_a_useful_linux_tool_that_you_use_that/
7474
http://www.reddit.com/r/linux4noobs/comments/2ao9tp/want_to_learn_to_be_a_linux_sysadmin/
7575
7676
http://inconsolation.wordpress.com/index/
7777
http://www.catonmat.net/blog/bash-one-liners-explained-part-one/
7878
http://www.howtogeek.com/howto/ubuntu/keyboard-shortcuts-for-bash-command-shell-for-ubuntu-debian-suse-redhat-linux-etc/
7979
http://mindspill.net/computing/linux-notes/
8080
http://conqueringthecommandline.com/
8181
http://n0where.net/open-source-sysadmin-resources/
8282
https://help.ubuntu.com/community/Servers
8383
8484
# installgentoo
8585
https://wiki.installgentoo.com/index.php?title=Main_Page
8686
8787
# About filesystem
8888
http://www.reddit.com/r/linux/comments/1ypoz8/take_the_linux_filesystem_tour/
8989
9090
# Hardlinks & Softlinks
9191
http://www.reddit.com/r/linux/comments/251mb8/the_difference_between_hard_and_soft_links/
9292
9393
# X11 / Xorg / graphics stack explained
9494
http://www.reddit.com/r/linux/comments/2acvmo/explaining_x11_for_the_rest_of_us/
9595
http://www.reddit.com/r/linux/comments/2b8ap8/heartwrenching_story_of_opengl/
9696
http://www.reddit.com/r/linux/comments/1twuhi/xplain_explaining_x11_for_the_rest_of_us_jasper/
9797
9898
# (Illustrated) SSH
9999
http://chamibuddhika.wordpress.com/2012/03/21/ssh-tunnelling-explained/
100100
http://www.unixwiz.net/techtips/ssh-agent-forwarding.html
101101
https://www.reddit.com/r/linux/comments/2iflp3/prefixed_multihop_ssh_wildcard_configurations/
102102
https://www.reddit.com/r/linux/comments/2r539r/why_arent_we_using_ssh_for_everything/
103103
104104
# The Fascinating World of Linux System Calls (sysdigcloud.com)
105105
https://www.reddit.com/r/linux/comments/2pm6lo/the_fascinating_world_of_linux_system_calls/
106106
107107
# systemd for Administrators, Part 1
108108
http://0pointer.de/blog/projects/systemd-for-admins-1.html
109109
# systemd for users
110110
http://www.reddit.com/r/linux/comments/2dvmdn/what_do_you_as_a_user_love_about_systemd/
111111
112112
# Rsync difference between --checksum and --ignore-times options
113113
http://serverfault.com/questions/211005/rsync-difference-between-checksum-and-ignore-times-options
114114
115115
# wget useful commands
116116
https://www.reddit.com/r/opendirectories/comments/2rfg79/20_wget_commands_that_can_be_used_to_accomplish/
117117
118118
# Rute User's Tutorial and Exposition
119119
http://rute.2038bug.com/index.html.gz
120120
121121
# Explains commands and their flags. VERY USEFUL!
122122
http://explainshell.com/
123123
124124
# IBM developer works
125125
http://www.ibm.com/developerworks/linux/
126126
127127
# Debian minimal
128128
http://linuxforcynics.com/how-to/minimal-debian-install
129129
http://ask.debian.net/questions/what-s-the-first-thing-you-do-after-you-install-debian
130130
131131
# BroPages
132132
http://bropages.org/browse
133133
134134
# Cron syntax in plain English
135135
http://cronchecker.net/
136136
137137
# Install WordPress on CentOS 6.x
138138
http://www.geekpeek.net/install-wordpress-on-centos/
139139
http://www.tecmint.com/install-wordpress-using-lamp-or-lemp-on-rhel-centos-fedora/
140140
141141
# iptables
142142
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-IPTables.html
143143
http://www.linuxtopia.org/online_books/centos_linux_guides/centos_linux_security_guide/s1-fireall-ipt-act.html
144144
http://www.cyberciti.biz/faq/rhel-fedorta-linux-iptables-firewall-configuration-tutorial/
145145
http://diaryproducts.net/about/operating_systems/unix/nmap_port_scanner_iptables_firewall
146146
147147
# GRUB
148148
http://ubuntuforums.org/showthread.php?t=1195275
149149
http://www.reddit.com/r/linux4noobs/comments/2ex4ex/short_introduction_into_grub_internals/
150150
151151
# Visualize memory
152152
https://www.reddit.com/r/linux/comments/2mrrjb/how_to_visualize_memory_usage_on_linux/
153153
154154
# inotify (trigger)
155155
https://www.reddit.com/r/commandline/comments/2runmh/how_you_can_use_inotifytools_to_monitor_file/
156156
157157
158158
[ Nginx ]
159159
# docs
160160
https://github.com/ngx/docs
161161
http://wiki.nginx.org/Main
162162
163163
# Optimizing nginx
164164
http://blog.zachorr.com/nginx-setup/
165165
166166
# How to redirect nginx
167167
http://www.servernoobs.com/nginx-redirect-url-with-http1-1-301-moved-permanently-header/?doing_wp_cron=1393287314.0689818859100341796875
168168
169169
# Hardening nginx with better cyphers
170170
https://www.reddit.com/r/netsec/comments/2pqsx9/harden_ssl_in_nginx_with_stronger_ciphers_newer/
171171
172172
173173
[ Docker ]
174174
http://www.reddit.com/r/linux/comments/2bxxye/introduction_to_docker/
175175
http://www.reddit.com/r/linux/comments/2c1csz/whos_using_docker/
176176
http://www.reddit.com/r/linux/comments/2bedwv/docker_security_with_selinux/
177177
https://github.com/shofetim/docker-skype
178178
179179
180180
[ Namespaces ]
181181
https://www.reddit.com/r/linux/comments/2n7mol/linux_namespaces_powerful_isolation_os_level/
182182
https://www.reddit.com/r/linux/comments/2n17b7/a_guide_to_linux_namespaces_and_environment/
183183
184184
185185
[ tmux ]
186186
http://www.reddit.com/r/linux/comments/2arczq/learn_tmux_with_minimul/
187187
http://www.reddit.com/r/commandline/comments/240oyo/mucks_a_session_manager_for_gnu_screen_and_tmux/
188188
http://www.reddit.com/r/commandline/comments/25tcfk/practical_tmux/
189189
190190
# Memory leak improvement under Linux - http://tmux.kpaste.net/ee9c3
191191
192192
193193
[ LOL / regex ]
194194
http://www.bbc.co.uk/news/world-europe-12985082
195195
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454
196196
197197
# Validating e-mail addresses, easy way, and the hard way.
198198
http://blog.mattheworiordan.com/post/13174566389/url-regular-expression-for-links-with-or-without-the
199199
http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
200200
201201
# Intro to regex
202202
http://www.youtube.com/watch?v=EkluES9Rvak
203203
204204
# Awk primer
205205
http://www.reddit.com/r/linux/comments/29hskb/an_awk_primer_wikibooks_open_books_for_an_open/
206206
207207
208208
[ LaTeX ]
209209
www.latextemplates.com
210210
https://www.writelatex.com/
211211
http://www.reddit.com/r/linux/comments/2clx22/learning_latex_on_linux/
212212
213213
214214
[ YouTube chans ]
215215
https://www.youtube.com/channel/UCbNxlZZVmfP8n84ag-rGpMg/videos
216216
https://www.youtube.com/user/theurbanpenguin/videos?view=1&flow=list
217217
https://www.youtube.com/user/sabiddle/videos
218218
# scripting
219219
http://www.youtube.com/playlist?list=PLcUid3OP_4OXOUqYTDGjq-iEwtBf-3l2E
220220
221221
222222
[[[ ~ Audio ~ ]]]
223223
224224
http://www.reddit.com/r/linux/comments/1nun4f/using_linux_to_make_music_whats_the_deal/
225225
https://www.reddit.com/r/linux/comments/2iwd2y/is_linux_suitable_for_audio_recordingproduction/
226226
https://wiki.archlinux.org/index.php/Pro_Audio
227227
http://alsa.opensrc.org/
228228
229229
http://tuxradar.com/content/how-it-works-linux-audio-explained
230230
http://stackoverflow.com/questions/20118941/linux-audio-sub-systems
231231
http://0pointer.de/blog/projects/guide-to-sound-apis.html
232232
233233
https://forum.ableton.com/viewtopic.php?f=4&t=187391
234234
235235
https://github.com/wedesoft/hornetseye-alsa
236236
https://github.com/torvalds/linux/tree/master/Documentation/sound/alsa
237237
238238
http://manual.ardour.org/synchronization/latency-and-latency-compensation/
239239
240240
# General Reddit threads
241241
http://www.reddit.com/r/linux/comments/236a5l/can_someone_make_something_akin_to_wayland_but/
242242
https://www.reddit.com/r/linux/comments/2sutds/my_band_pneumonia_recorded_our_first_album_using/
243243
244244
# Dynamic Range Compression for PulseAudio
245245
https://www.bfccomputing.com/dynamic-range-compression-for-pulseaudio/
246246
247247
# ALSA / Pulseaudio for pro audio discussion
248248
https://www.reddit.com/r/linux/comments/2hv73a/what_is_the_one_thing_you_wish_linux_had_natively/ckwd9mk
249249
250250
# Config
251251
http://wiki.linuxaudio.org/wiki/system%20configuration#build_your_own_real-time_kernel_on_debian_wheezy_or_later
252252
http://www.penguinproducer.com/Blog/2011/12/setting-up-a-studio-with-ubuntu/
253253
254254
# RIP CDs
255255
https://www.reddit.com/r/linux/comments/2ijhdj/gnu_ddrescue_119_released/cl2pofg
256256
257257
# Speech / Voice recognition
258258
http://grasch.net/node/22
259259
https://www.reddit.com/r/linux/comments/2jhzle/the_state_of_voice_recognition_software_within/https://www.reddit.com/r/linux/comments/2jhzle/the_state_of_voice_recognition_software_within/
260260
261261
# Learn piano
262262
http://pianobooster.sourceforge.net/
263263
264264
# The power of (GC)C
265265
echo "main(i){for(i=0;;i++)putchar(((i*(i>>17|i>>9)&46&i>>3))^(i&i>>10|i>>100));}" | gcc -w -x c - && ./a.out | aplay
266266
267267
# Troubleshooting
268268
lsusb / lspci
269269
cat /proc/asound/cards
270270
aplay -l
271271
aplay-L
272272
273273
274274
275-
[[[ GAEMZ ]]]
275+
[[[ Alternative UI ]]]
279276
280-
# RetroRig
277+
# Dex UI - Futuristic/Sci-Fi Interface Programmed In openFrameworks (nnkd.org)
281-
http://www.reddit.com/r/LinuxActionShow/comments/25wndc/retrorig_a_personal_project_i_hope_everyone/
278+
https://www.reddit.com/r/linux/comments/2t0vjv/dex_ui_futuristicscifi_interface_programmed_in/
282279
280+
# Eagle Mode - Zoomable User Interface (YouTube)
283282
284283
286284
287-
[ Prevent ]
285+
[[[ GAEMZ ]]]
288-
# Backup ideas
286+
# TribesNext (Tribes2 re-implementation) under Linux
289-
https://www.reddit.com/r/linux/comments/2qtyby/what_does_rlinux_use_to_backup_their_computers/
287+
http://www.tribesnext.com/forum/index.php?topic=2095.0
288+
http://www.youtube.com/watch?v=fdyxo_tauNQ
290289
291-
# How to shred recursively in directories
290+
# RetroRig
292-
http://www.linuxforums.org/forum/miscellaneous/46693-how-shred-entire-directory-tree.html#post257616
291+
http://www.reddit.com/r/LinuxActionShow/comments/25wndc/retrorig_a_personal_project_i_hope_everyone/
293292
296293
299294
295+
[[[ Damage ]]]
300296
297+
[ Prevent ]
301300
302-
[[[ Shell & Scripting ]]]
301+
# How to shred recursively in directories
303-
http://www.reddit.com/r/linux/comments/2foinb/what_is_the_exact_difference_between_a_terminal_a/
302+
http://www.linuxforums.org/forum/miscellaneous/46693-how-shred-entire-directory-tree.html#post257616
310303
311-
# About terminals
304+
# What to do when altering remote machines
312-
http://linuxgazette.net/137/anonymous.html
305+
http://www.reddit.com/r/linux/comments/1kdf37/what_are_some_of_your_major_linux_fk_ups/cbnzb11
313306
314-
# Customization
307+
[ Control ]
315-
http://www.reddit.com/r/commandline/comments/23c4us/the_bash_prompt/
308+
http://serverfault.com/questions/218005/how-do-i-deal-with-a-compromised-server
317309
320310
323311
324-
# Bash vs. Zsh
312+
[[[ Shell & Scripting ]]]
325-
http://www.reddit.com/r/linux/comments/2fubpn/zsh_proscons/
313+
http://www.reddit.com/r/linux/comments/2foinb/what_is_the_exact_difference_between_a_terminal_a/
314+
http://mywiki.wooledge.org/
326320
327-
# How does the Shellshock exploit work?
321+
# About terminals
328-
http://fedoramagazine.org/shellshock-how-does-it-actually-work/
322+
http://linuxgazette.net/137/anonymous.html
330323
331-
# Fav minimalist CLI apps
324+
# Customization
332-
https://www.reddit.com/r/linux/comments/2psson/whatre_your_favorite_cli_and_minimalistic/
325+
http://www.reddit.com/r/commandline/comments/23c4us/the_bash_prompt/
326+
https://www.reddit.com/r/linux/comments/2iytrs/terminalsexy_terminal_color_scheme_designer/
333327
328+
# Bash search suggest box
334330
331+
# Moar advice
335333
336-
[ VIM ]
334+
# Bash vs. Zsh
337-
# Learn
335+
http://www.reddit.com/r/linux/comments/2fubpn/zsh_proscons/
344336
345-
http://pascalprecht.github.io/2014/03/18/why-i-use-vim/
337+
# How does the Shellshock exploit work?
346-
http://of-vim-and-vigor.blogspot.de/2012/06/art-of-edits-i-weaponry.html
338+
http://fedoramagazine.org/shellshock-how-does-it-actually-work/
347-
http://www.reddit.com/r/linux/comments/1kdvq5/til_that_vim_has_tabs_thats_wonderful/
339+
https://www.reddit.com/r/linux/comments/2hlwwz/stackexchanges_top_answer_on_shellshock_and_why/
350340
351-
http://vimcasts.org/
341+
# Fav minimalist CLI apps
342+
https://www.reddit.com/r/linux/comments/2psson/whatre_your_favorite_cli_and_minimalistic/
352343
355344
358345
359-
# Color schemes
346+
[ VIM ]
360-
https://code.google.com/p/vimcolorschemetest/
347+
# Learn
348+
https://raw.github.com/dahu/LearnVim/master/doc/learnvim.txt
361354
362-
# Plugins
355+
http://pascalprecht.github.io/2014/03/18/why-i-use-vim/
363-
http://www.reddit.com/r/linux/comments/29a0ya/vim_awesome/
356+
http://of-vim-and-vigor.blogspot.de/2012/06/art-of-edits-i-weaponry.html
364-
http://lsh.io/plugtalk/#48
357+
http://www.reddit.com/r/linux/comments/1kdvq5/til_that_vim_has_tabs_thats_wonderful/
358+
http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim
365360
361+
http://vimcasts.org/
366362
363+
# book
367365
368-
[[[ Drama ]]]
366+
# counter-argument
369-
http://www.reddit.com/r/linux/comments/1z0vig/ffmpeg_may_return_to_debian_and_by_extend_ubuntu/cfpjqtj
367+
http://www.reddit.com/submit?url=http%3A%2F%2Fdelvarworld.github.io%2Fblog%2F2013%2F03%2F16%2Fjust-use-sublime-text%2F
370368
369+
# Color schemes
371371
372+
# Plugins
372375
377376
378377
379-
[[[ FreeNAS ]]]
378+
[[[ Drama ]]]
380-
# Check temps
379+
http://www.reddit.com/r/linux/comments/1z0vig/ffmpeg_may_return_to_debian_and_by_extend_ubuntu/cfpjqtj
382380
385381
388382
389-
# Persistent changes in the filesystem - http://kpaste.net/a2c0299
383+
[[[ urxvt ]]]
384+
https://wiki.archlinux.org/index.php/rxvt-unicode
390387
398388
389+
[[[ FreeNAS ]]]
399392
400-
[[[ Hardware ]]]
393+
# Checklist
401-
http://www.reddit.com/r/linux/comments/22cnui/pc_engines_apu_system_boards_3x_gige_2_or_4_gb/
394+
https://www.reddit.com/r/freenas/comments/1vw9ic/thinking_about_freenas_but_getting_overwhelmed/
403395
396+
# Backup config files automatically
404398
399+
# Persistent changes in the filesystem - http://kpaste.net/a2c0299
405400
406-
[[[ TODO: ]]]
401+
# The connection problem:
407-
Learn the filesystem hierarchy and major bits such as your bootloader, init system or systemd, etc
402+
https://www.reddit.com/r/linux4noobs/comments/2q2cn1/i_want_to_connect_to_my_isolated_nas_but_at_the/
408-
File shares (Samba, NFS, iSCSI)
403+
# Solutions:
409-
Network Services (SSHD, DNS, DHCP, PXE, TFTP, FTP, etc)
404+
http://lamarque-lvs.blogspot.nl/2011/11/networkmanager-per-device-routing.html
410-
Automation (Scripting, Configuration management ie Ansible, Puppet, Chef, Saltstack)
405+
http://askubuntu.com/questions/89364/force-network-manager-to-use-wireless-for-an-internet-connection
411-
Hardening, Security and Accounts (IPTables, SELinux, patching/repository management, cgroups, encryption, permissions, ldap and kerberos SSO)
406+
https://superuser.com/questions/9586/how-do-i-setup-ubuntu-linuxs-network-manager-to-selectively-route-network-traff
407+
http://ubuntuforums.org/showthread.php?t=2161887
412408
413409
414-
======================================================================
410+
[[[ Hardware ]]]
415-
HANDY COMMANDOS
411+
http://www.reddit.com/r/linux/comments/22cnui/pc_engines_apu_system_boards_3x_gige_2_or_4_gb/
412+
http://www.reddit.com/r/linux/comments/226izd/intel_releases_99_minnowboard_max_an_opensource/
416413
420414
423415
424-
# GPG encrypt
416+
[[[ TODO: ]]]
425-
gpg -ac archive_name.tar
417+
Learn the filesystem hierarchy and major bits such as your bootloader, init system or systemd, etc
418+
File shares (Samba, NFS, iSCSI)
426422
429423
424+
======================================================================
430427
---
431-
# CLI pastebin alias
428+
# Archive directory
432-
alias apaste='curl -F '\''paste=<-'\'' http://apaste.info/store'
429+
tar -cvWf archive_name.tar dir_name
433430
434-
# Do The Right Extract
431+
# Extract archive
435-
http://brettcsmith.org/2007/dtrx/
432+
tar -xvf archive_name.tar
436433
437-
# How to check install size of packages (debian based)
434+
# GPG encrypt
438-
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | less
435+
gpg -ac archive_name.tar
439436
440-
# Badblocks
437+
# GPG decrypt
441-
badblocks -nsv -p2 -o ./badblocksresult.txt /dev/sdX
438+
gpg -d archive_name.tar.asc > archive_name.tar
442439
443-
# Watch progress of dd
440+
---
444-
watch -n 1 killall -USR1 dd
441+
# CLI pastebin alias
442+
alias apaste='curl -F '\''paste=<-'\'' http://apaste.info/store'
445443
446-
# What's the best rsync command?
444+
# Do The Right Extract
447-
rsync -avPHSxh
445+
http://brettcsmith.org/2007/dtrx/
448446
449-
# Superfind
447+
# How to check install size of packages (debian based)
450-
http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-on-linux
448+
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | less
451449
452-
# List only dirs and files starting with a . (dot)
450+
# Badblocks
453-
ls -d .[^.]*
451+
badblocks -nsv -p2 -o ./badblocksresult.txt /dev/sdX
454452
453+
# Watch progress of dd
455455
456-
diff <(ls /tmp/folder1) <(ls /tmp/folder2) # diff output of 2 commands
456+
# What's the best rsync command?
457-
diff -r /tmp/folder1 /tmp/folder2 # diff 2 dirs
457+
rsync -avPHSxh
458458
459-
# Substitute string1 to string2 in every file in a given path
459+
# Superfind
460-
find path -type f -exec sed -i 's/string1/string2/' {} \;
460+
http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-on-linux
461461
462-
## in vim:
462+
# List only dirs and files starting with a . (dot)
463-
# Visually select a block of text and prepend a '#' to it
463+
ls -d .[^.]*
469464
470465
471-
466+
diff <(ls /tmp/folder1) <(ls /tmp/folder2) # diff output of 2 commands
472-
467+
diff -r /tmp/folder1 /tmp/folder2 # diff 2 dirs
473468
474-
469+
# Substitute string1 to string2 in every file in a given path
475-
470+
find path -type f -exec sed -i 's/string1/string2/' {} \;
476471
477-
472+
## in vim:
478-
473+
# Visually select a block of text and prepend a '#' to it
479-
474+
1. Visually select block
480-
475+
2. Ctrl+v I # Esc
481-
476+
# Do the reverse (remove prepending '#' characters)
482-
477+
1. Visually select block
483-
478+
2. Ctrl+v 0 x

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at