FTLinuxCourse - Tin tổng hợp mới nhất không thể bỏ lỡ
  • Home
  • Lập Trình Linux
  • Công Nghệ
  • Máy Tính
No Result
View All Result
  • Home
  • Lập Trình Linux
  • Công Nghệ
  • Máy Tính
No Result
View All Result
FTLinuxCourse - Tin tổng hợp mới nhất không thể bỏ lỡ
No Result
View All Result

File Globbing In Linux

admin by admin
April 25, 2020
in Lập Trình Linux
26
File Globbing In Linux



File globbing refers to “global” patterns that specify sets of filenames with wildcard characters. Globbing is the * and ? and some other pattern matchers you may be familiar with. An example would be doing something like the following in the Bash shell: cp *.txt /Documents/text/

REFERENCED:
►

WANT TO SUPPORT THE CHANNEL?
💰 Patreon:
💳 Paypal:
🛍️ Amazon:
👕 Teespring:

SOCIAL PLATFORMS:
🗨️ Mastodon:
💬 IRC: irc://freenode #distrotube
👫 Reddit:
📽️ LBRY:

DT ON THE WEB:
🕸️ Website:
🐿️ Gopherhole: gopher://distro.tube
📁 GitLab:

FREE AND OPEN SOURCE SOFTWARE THAT I USE:
🌐 Brave Browser –
📽️ Open Broadcaster Software:
🎬 Kdenlive:
🎨 GIMP:
🔊 Audacity:
💻 VirtualBox:

Your support is very much appreciated. Thanks, guys!

Nguồn: https://ftlinuxcourse.com

Xem thêm bài viết khác: https://ftlinuxcourse.com/lap-trinh-linux

Xem thêm Bài Viết:

  • Trải nghiệm mới hay ho với hướng dẫn cài Mac Os trên vmware
  • Bật mí cách cài đặt ssl miễn phí lên Let’s Encrypt
  • Tuyệt chiêu tạo usb boot kali linux đơn giản dành cho bạn
  • Hướng dẫn chi tiết từ A – Z các bước cài đặt Python trên Windows 10
  • Bật mí quy trình cài đặt Kali Linux trên Vmware đúng chuẩn và chi tiết
Tags: Youtube
Previous Post

Phòng chống virus hiệu quả? Nên mua phần mềm diệt virus gì?

Next Post

Hướng dẫn chỉnh sửa ảnh thẻ sử dụng phần mềm adobe Photoshop | Tự Học Đồ Hoạ

Next Post
Hướng dẫn chỉnh sửa ảnh thẻ sử dụng phần mềm adobe Photoshop | Tự Học Đồ Hoạ

Hướng dẫn chỉnh sửa ảnh thẻ sử dụng phần mềm adobe Photoshop | Tự Học Đồ Hoạ

Comments 26

  1. Oerjan Snell says:
    3 years ago

    @DistroTube!!

    You got any link for a good video about just RegExp?
    I read alot even seen some vids and still got real problems handling this.

    Reply
  2. Bernd Eckenfels says:
    3 years ago

    You should mention the "echo test?.txt" trick to check what the pattern matches. Also backslash as a escape and single quotes to turn globing off

    Reply
  3. SuperWolfkin says:
    3 years ago

    I mean why not just use commands like
    >ls file[0-9].txt

    it would show what's being filtered without you needing to remove files and retouch them.

    Reply
  4. Jawhar B. says:
    3 years ago

    thank you for the detailed video about file globing, I got a question, it might seem for you or for many easy stuff, but for me I feel confused, what is the difference between forking and subshell?

    I mean they seem very similar both copy the shell as the "Linux Command Line and Shell Scripting Bible" said, the book didn't say that literally but they have the picture for forking and subshelling, however, I research that and it made it worst 😥

    Reply
  5. doom says:
    3 years ago

    Any chance you can do a video on how you colorize your shell output? I have a theme in my terminal but I don't have different colors for certain columns. What about manpage coloring? Can you throw it in as well? Cheers!

    Reply
  6. Saikat Chatterjee says:
    3 years ago

    Is that a Hugo project folder? Saw the config.toml file

    Reply
  7. Timothy Edgin says:
    3 years ago

    I love the Matrix screensaver but stopped using them when I caught a trojan in one; know where I can get one that is clean? Thanks for the refresh on globs.

    Reply
  8. Nerrufam says:
    3 years ago

    The 'g' in "RegEx" is pronounced the same as the 'g' in "Regular"

    Reply
  9. Matej Petelin says:
    3 years ago

    Hey man, thanks for all the awesome videos. I'm learning Linux again!

    Reply
  10. Serge says:
    3 years ago

    Starting at 6:36 "There is no …." Oops …………………. Of course it is possible to use the square bracket wildcard in SQL:
    https://www.techonthenet.com/sql_server/like.php
    https://www.tutorialgateway.org/sql-like/
    https://www.educba.com/wildcards-in-mysql/

    Reply
  11. Lawrence D’Oliveiro says:
    3 years ago

    As an exercise, how would you write a wildcard to match dotfiles in your home directory? These are the various files/directories containing user preferences for apps that you run. Their names begin with a dot, so they are normally excluded from directory listings. However, if you type something like “ls -ld ~/.*”, it will also show the useless “.” and “..” entries that clutter every Unix/Linux directory. How do you exclude these?

    The answer is:

    ls -ld ~/.[!.]*

    Reply
  12. Lawrence D’Oliveiro says:
    3 years ago

    7:10 If you want to use regexes to match file names, you can do so with the “find” command. That’s a very useful command, by the way; worth doing an episode on, I think.

    Reply
  13. Peter Jansen says:
    3 years ago

    Back in the days when people still used MS-DOS every somewhat experienced PC-user knew about this. DT, you shouldn't have cut out the for-loop (I assume that you created those files with a for-loop and touch) in my opinion.

    Reply
  14. Bruce Scott says:
    3 years ago

    Nothing like Globbing to get some work done.. It is strange the names that Linux folks come up with… I just go with it as it is really neat! Thanks DT for the video!
    LLAP

    Reply
  15. Learn Linux says:
    3 years ago

    There's not just file globbing either, there's the standard globbing (can't remember it's name) you use, for example, in case statements.

    Would be interesting to see you make a REGEX video, too. By the way, it's hard G, because re[g]ular expressions.

    Reply
  16. Robert Catesby says:
    3 years ago

    What's the command for restoring the deleted .txt test files?

    Reply
  17. GNU_Ninja says:
    3 years ago

    I'm a glob denier, flat erf rulez 😏

    Reply
  18. madd_step says:
    3 years ago

    1:55

    touch file{1..10}.txt
    you can iterate to 10 and make bash do the work for you! typing that long touch command is a chore.

    Reply
  19. fredhair says:
    3 years ago

    Asterix symbol? What about the Obelix symbol?

    Reply
  20. Ghislain Laframboise says:
    3 years ago

    Always test you command with ls or select in SQL before you use wildcard so you sure it does what you want ! But it's a good reminder of the basic command. As always, Great Job, Derek !

    Reply
  21. BlackWorm says:
    3 years ago

    Great video.
    Very useful info.

    Reply
  22. Anzan Hoshin Roshi says:
    3 years ago

    Thank you, Derek. Good stuff.

    Reply
  23. Yazen says:
    3 years ago

    Fun fact: GNU grep can be used to express regular languages, but not all grep regexes express regular languages.

    Reply
  24. Khyree Holmes says:
    3 years ago

    Something to throw in my Hat about Linux.

    Reply
  25. D Gowers says:
    3 years ago

    I didn't know that you can use ! instead of ^.
    ^ still seems preferable to me because it's exactly the same syntax that will be needed when later learning regexps.

    I understand why you might avoid getting into the translation between globbing/shell patterns, but I think the basic rules can be summarized pretty succinctly:

    '*' in glob translates to '.*' ('any character' + '0 or more of') in regexp
    '?' in glob translates to '.' ('any character'; without the '0 or more of' modifier, this matches exactly 1 character)
    '[…]' in glob translates to .. exactly the same in regexp (with some exceptions relating mainly to the use of backslashes)
    '[!…]' or '[^…]' in glob is as stated above, '[^…]' in regexp
    . , (, ), $, ^ in glob (outside of a character class) should be prefixed with a backslash for regexp

    One other thing I think maybe should be mentioned is that the subject you actually covered was POSIX file globbing ('sh' / 'bash' without the 'extglob' option set), and other shells may have more (zsh, bash with the extglob option set) or less (fish) sophisticated globbing available.

    Reply
  26. Carl Sanchez 007 says:
    3 years ago

    touch file{1..10}.txt 🙂

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Xem Thêm

Những điều bạn có thể chưa biết về Thánh sim Hi Vietnamobile

Những điều bạn có thể chưa biết về Thánh sim Hi Vietnamobile

January 17, 2021
Xiaomi Mi 10 Pro thiết kế thời thương, màn hình cong ấn tượng

Xiaomi Mi 10 Pro thiết kế thời thương, màn hình cong ấn tượng

June 1, 2021
Địa chỉ in bao bì nhựa tại Đà Nẵng chiết khấu cao

Địa chỉ in bao bì nhựa tại Đà Nẵng chiết khấu cao

January 26, 2021
Địa chỉ bán đèn tuýp LED Philips uy tín và chất lượng trên thị trường?

Bán đèn tuýp led Philips – Skyled

July 27, 2020
Lựa chọn chủ đề in áo thun phù hợp

Lựa chọn dịch vụ in áo thun cotton cần lưu ý gì?

August 2, 2020
Cần xác định được điểm đặt pallet cao nhất để mua xe

Bí quyết chọn mua xe nâng điện đẩy tay

August 3, 2020

Về Chúng Tôi

Báo ftlinuxcourse.com 24h – Đón xem những tin tức mới nhất về tình hình chính trị, xã hội, an ninh trật tự, văn hóa – giải trí, thể thao, thông tin trong ngày.

  • Liên Hệ
  • Chính Sách Bảo Mật

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Lập Trình Linux
  • Công Nghệ
  • Máy Tính

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.