Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash get file name

# Basic syntax:
basename $YOURFILE

# Example usage:
YOURFILE="/path/to/your_file.txt"
basename $YOURFILE
--> your_file.txt

# Note, to remove a specified suffix from the file name, add it at the end like:
basename $YOURFILE .txt
--> your_file

# Note, to run basename in a bash script and assign the output to a variable,
# use the following syntax:
FILENAME="$(basename -- $YOURFILE)"
Comment

bash find file by name

find . -name 'mystring*'
Comment

find file by name linux

find /path -name *.txt
find /path -type f -name test.txt
find /path -name failed*.* -type f
find /path -type f -not -name “*.html”
find / -name “file.txt” -size +4M
find /dev/ -type b -name “sda*”
Comment

find file by name linux

find /path -name *.txt
Comment

bash find file

# syntax 
# find *</path/to/dir> '(' *<filter-1> -o *<filter-2> ')'

# example 
find . '(' -name '*ERR5312209.zip' -o -name '*ERR5312209.TXT' ')'
Comment

PREVIOUS NEXT
Code Example
Shell :: add github repo 
Shell :: bash replace symlinks files 
Shell :: cursor pointer freezes ubuntu- keystrokes to release 
Shell :: bash randomly shuffle all rows of a file 
Shell :: how to find and replace a string in a file using shell script on mac 
Shell :: gdal 0 1 raster to binary 
Shell :: vim sudo write 
Shell :: powershell disk space 
Shell :: npm install discord.js 
Shell :: bash location of substring match within string 
Shell :: install php on wsl2 
Shell :: start mongod ubntu 
Shell :: how to find host name in linux 
Shell :: shopify theme kit for linux 
Shell :: centos install wget 
Shell :: libevent ubuntu install 
Shell :: git remoev .DS_Store 
Shell :: add onedrive to ubuntu 
Shell :: kill screen 
Shell :: ubuntu remove except file 
Shell :: change hstr editor 
Shell :: pacman 404 
Shell :: how to know namespace is present or not in kubernetes shell script 
Shell :: how to replace string in a json sed 
Shell :: remove trash linux 
Shell :: windows get hostname from ip 
Shell :: uninstall gitkraken in ubuntu 
Shell :: git log for specific file 
Shell :: add git submodule 
Shell :: mongodb create collection 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =