nl
stringlengths 13
387
| bash
stringlengths 1
532
|
|---|---|
List all *.txt files/directories under /etc
|
find /etc -name "*.txt" | xargs ls -l
|
List all *.txt files/directories under /etc
|
ls -l $(find /etc -name "*.txt" )
|
List all *.txt files/directories under current directory
|
find . -name "*.txt" -exec $SHELL -c 'echo "$0"' {} \;
|
List all *.txt files/directories under current directory
|
find . -name "*.txt" -print
|
List all *.txt files/directories under current directory
|
find . -name '*.txt' -exec echo "{}" \;
|
List all *.txt files/directories under current directory
|
find . -name *.txt -exec ls {} \;
|
List all *.txt files/directories under current directory ensuring white space safety
|
find . -name '*.txt' -print0|xargs -0 -n 1 echo
|
list all *.txt files in the user's home directory.
|
find ~/ -name '*.txt'
|
List all *.txt files under current directory that contains the regex 'pattern'
|
find . -type f -name '*.txt' -exec egrep -l pattern {} \;
|
List all *.txt files under current directory that match 'foo=' in their file information
|
find . -name "*.txt" -type f -print | xargs file | grep "foo=" | cut -d: -f1
|
List all *fink* files/directories in entire file system
|
find / \( -type f -or -type d \) -name \*fink\* -ls
|
List all *fink* files/directories under current directory
|
find . -name "*fink*" |xargs ls -l
|
List all *jsp and *java regular files found in the current directory tree
|
find . \( -name '*jsp' -o -name '*java' \) -type f -ls
|
List all .c and .h files in the current directory tree that contain "thing"
|
find . -name '*.[ch]' -print0 | xargs -r -0 grep -l thing
|
List all .c and .h files in the current directory tree that contain "thing"
|
find . -name '*.[ch]' | xargs grep -l thing
|
List all the .c files under the current directory and below in a 3 column format
|
find . -name "*.c" | xargs -n3
|
List all the .c files under the current directory and below in a 3 column format
|
find . -name "*.c" | xargs -n3 echo
|
list all .c or .sh regular files.
|
find . -type f \( -name "*.c" -o -name "*.sh" \)
|
List all .gif files in the current directory tree
|
find . -name *.gif -exec ls {} \;
|
list all active jobs and its IDs
|
jobs -l
|
List all available commands in Mac OS
|
echo $PATH | tr ':' '\n' | xargs -I {} find {} -maxdepth 1 -type f -perm '++x'
|
List all broken symlinks excluding cyclic links under current directory
|
find . -type l -printf "%Y %p\n" | grep -w '^N'
|
List all cron jobs which contain "word".
|
crontab -l | egrep "word"
|
List all cron jobs which contain "word".
|
crontab -l | grep 'word'
|
List all directories and subdirectories
|
find . -type d
|
Lists all directories in '/home/alice/Documents/'.
|
ls -d /home/alice/Documents/*/
|
Lists all directories in a current folder.
|
ls -d */
|
Lists all directories in the current folder.
|
ls -d ./*/
|
List all directories in maximum 1 level down the current directory
|
find . -maxdepth 1 -type d -exec ls -dlrt {} \;
|
List all directories in maximum 1 level down the current directory
|
find . -type d -maxdepth 1 -exec ls -dlrt {} \;
|
list all the drectories present in the current directory and do not search in the sub directories.
|
find -maxdepth 1 -type d
|
List all directories under current directory
|
find . -type d -exec ls -dlrt {} \;
|
List all empty files in the current directory tree
|
find . -empty -exec ls {} \;
|
List all empty files in the current directory tree
|
find . -type f -empty
|
List all the emptry files in thecurrent directory only.
|
find . -maxdepth 1 -empty
|
List all empty files under the current directory
|
find . -maxdepth 1 -empty
|
List all environment variables containing 'USER' in their name or value that would result in running a command with 'sudo env'.
|
sudo env |grep USER
|
List all environment variables (name and value) whose name either equals HOME or PATH, or starts with GO
|
env | grep '^\(GO\|HOME=\|PATH=\)'
|
List all environment variables (name and value) whose name either equals PATH or starts with GOBIN
|
env | grep '^\(GOBIN\|PATH=\)'
|
List all environment variables (name and value) whose name starts with GOROOT
|
env | grep '^GOROOT'
|
List all environment variables whose name starts with PATH, showing the name and value of each one.
|
env | grep ^PATH
|
List all files 2 levels deep in the current directory tree
|
tree -L 2 -fi
|
List all files and directories from the current directory tree
|
find . -print | xargs ls
|
List all files and directories (including hidden) in the current working directory in a long list format sorted by the oldest modification time
|
ls -alrt `pwd`/*
|
List all files/directories in entire file system
|
find / -print
|
List all files and directories residing in the current directory and below
|
find -print0 | xargs -0 ls
|
List all files and directories residing in the current directory and below
|
find | xargs ls
|
List all files/directories under $dir_name with size $sizeFile and print them according to the format string '%M %n %u %g %s %Tb %Td %Tk:%TM %p\n'
|
find $dir_name -size $sizeFile -printf '%M %n %u %g %s %Tb %Td %Tk:%TM %p\n'
|
List all files/directories under /data1/Marcel which are greater than 524288 bytes and were modified or accessed more than 1 year ago
|
find /data1/Marcel -size +1024 \( -mtime +365 -o -atime +365 \) -ls
|
List all files/directories under /data1/Marcel with their file information which are greater than 524288 bytes and were modified or accessed more than 1 year ago
|
find /data1/Marcel -size +1024 \( -mtime +365 -o -atime +365 \) -ls -exec file {} \;
|
List all files/directories under /myfiles directory
|
find /myfiles -exec ls -l {} ;
|
List all files/directories under current directory by replacing all spaces with commas (,)
|
find . -ls | tr -s ' ' ,
|
List all files/directories under current directory ensuring white space safety
|
find -print0 | xargs --null
|
List all files/directories under current directory matching the posix-egrep type regex ".+\.(c|cpp|h)$" in their names
|
find . -regextype posix-egrep -regex ".+\.(c|cpp|h)$" -print0 | xargs -0 -n 1 ls
|
List all files/directories under current directory matching the posix-egrep type regex ".+\.(c|cpp|h)$" in their names
|
find . -regextype posix-egrep -regex ".+\.(c|cpp|h)$" | xargs -n 1 ls
|
List all files/directories under current directory matching the posix-egrep type regex ".+\.(c|cpp|h)$" in their names excluding the files that contain 'generated' or 'deploy' in their paths
|
find . -regextype posix-egrep -regex '.+\.(c|cpp|h)$' -print0 | grep -vzZ generated | grep -vzZ deploy | xargs -0 ls -1Ld
|
List all files/directories under current directory matching the posix-egrep type regex ".+\.(c|cpp|h)$" in their names excluding the paths */generated/* and */deploy/*
|
find . -regextype posix-egrep -regex '.+\.(c|cpp|h)$' -not -path '*/generated/*' -not -path '*/deploy/*' -print0 | xargs -0 ls -L1d
|
List all files/directories under current directory with 'FooBar' in their paths ensuring white space safety
|
find . -print0 | grep --null 'FooBar' | xargs -0
|
List all files/directories under current directory with their inode numbers, disk space, permission, number of hard links, user name, group name, size, status change time in Y-m-d format and name filed, then write the outptut to /tmp/files.txt
|
find . -type f -fprintf /tmp/files.txt "%i,%b,%M,%n,%u,%g,%s,%CY-%Cm-%Cd %CT,%p\n"
|
List all files/directories with spaces in their names under ~/Library directory
|
find ~/Library -name '* *' -exec ls {} \;
|
List all files and folders in the current working directory
|
ls `pwd`/*
|
List all files and sub directories including hidden files in the current directory tree
|
tree -af
|
List all files except for those in directory SCCS
|
find . -print -o -name SCCS -prune
|
List all files from the current directory tree that were modified less than 60 minutes ago
|
find . -mmin -60 -ls
|
List all files from the current directory tree that were modified less than 60 minutes ago
|
find . -mmin -60 | xargs -r ls -l
|
List all files from the current directory tree that were modified less than 60 minutes ago
|
find . -mmin -60 | xargs -r ls -ld
|
List all files from the current directory tree that were modified less than 60 minutes ago, omitting "."
|
find . -mindepth 1 -mmin -60 | xargs -r ls -ld
|
List all files in the "test" directory tree except those with '/invalid_dir/' in the pathnames
|
find test -print | grep -v '/invalid_dir/'
|
List all files in /home/bozo/projects directory tree that were modified exactly one day ago
|
find /home/bozo/projects -mtime 1
|
List all files in /home/bozo/projects directory tree that were modified exactly one day ago.
|
find /home/bozo/projects -mtime 1
|
list all files in /home/bozo/projects directory tree that were modified exactly one day ago.
|
find /home/bozo/projects -mtime 1
|
List all files in /home/bozo/projects directory tree that were modified within the last day
|
find /home/bozo/projects -mtime -1
|
List all files in /home/bozo/projects directory tree that were modified within the last day.
|
find /home/bozo/projects -mtime -1
|
list all files in /home/bozo/projects directory tree that were modified within the last day
|
find /home/bozo/projects -mtime -1
|
List all files in the /hometest directory tree whose names are "Trash", and their sizes
|
find /hometest -name Trash -exec ls -s {} \;
|
List all files in the /myfiles directory tree
|
find /myfiles -exec ls -l {} ;
|
List all files in the /var directory tree whose size is greater than 10 megabytes
|
find /var/ -size +10M -exec ls -lh {} \;
|
List all files in the /var directory tree whose size is greater than 10 megabytes
|
find /var/ -size +10M -ls
|
List all files in /var/www and below that have changed in the last 10 minutes
|
find /var/www -cmin -10 -printf "%c %pn"
|
Lists all files in a '/home/dreftymac/' folder and subfolders without recursion.
|
ls /home/dreftymac/*
|
List all files in a current folder, separating names with comma
|
ls -1 | tr '\n' ','
|
Lists all files in a current folder, separating names with comma.
|
ls -1 | paste -sd "," -
|
Lists all files in a current folder, separating names with comma.
|
ls -m
|
Lists all files in a current folder, separating names with comma.
|
ls | xargs -I {} echo {}, | xargs echo
|
List all files in a current folder, separating names with semicolon
|
ls -1b | tr '\n' ';'
|
List all files in a current folder, separating names with semicolon
|
ls -m | tr -d ' ' | tr ',' ';'
|
list all files in the current directory recursively
|
find .
|
List all files in the current directory tree except for those in the ./src/emacs directory
|
find . -path './src/emacs' -prune -o -print
|
List all files in the current directory tree including those that may contain spaces in their names
|
find . -print0 | xargs -0 -l -i echo "{}";
|
List all files in the current directory tree invoking xargs only once
|
find . -type f -print | xargs ls -l
|
List all files in the current directory tree that were last modified between "mar 03, 2010 09:00" and "mar 11, 2010"
|
find -newermt "mar 03, 2010 09:00" -not -newermt "mar 11, 2010" -ls
|
List all files in the current directory tree that were last modified in March 2007
|
find ! -newermt "apr 01 2007" -newermt "mar 01 2007" -ls
|
List all files in the current directory tree that were last modified more than 60 minutes ago
|
find -mmin +60
|
List all files in the current directory tree that were last modified on the 3rd of March, 2010 or later
|
find -newermt "mar 03, 2010" -ls
|
List all files in the current directory tree that were last modified yesterday or later
|
find -newermt yesterday -ls
|
List all files in the current directory tree that were modified 60 minutes ago
|
find -mmin 60
|
List all files in the current directory tree that were modified 60 minutes ago
|
find . -mmin 60 -print0 | xargs -0r ls -l
|
List all files in the current directory tree that were modified 60 minutes ago
|
find . -mmin 60 | xargs '-rd\n' ls -l
|
List all files in the current directory tree that were modified less than 60 minutes ago
|
find . -mmin -60 |xargs ls -l
|
list all the files in the current directory which are of size 0 bytes.
|
find . -empty
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.