nl
stringlengths
13
387
bash
stringlengths
1
532
Make directories "foo/bar/baz" as needed and do not cause an error if it exists
mkdir -p foo/bar/baz
Make directories "mnt" and "point"
mkdir mnt point
Make directory "new_dir"
mkdir new_dir
Make directories "project/{lib/ext,bin,src,doc/{html,info,pdf},demo/stat/a}" as needed and do not cause an error if it exists
mkdir -p project/{lib/ext,bin,src,doc/{html,info,pdf},demo/stat/a}
Make directory "saxon_docs"
mkdir saxon_docs
Make directory "subdirectory"
mkdir subdirectory
Make directory "tata"
mkdir tata
Make directory "temp"
mkdir temp
Make directory "testExpress"
mkdir testExpress
Make directories "tmp/real_dir1" and "tmp/real_dir2" as needed
mkdir -p tmp/real_dir1 tmp/real_dir2
Make directory "~/log"
mkdir ~/log
Make directory "~/practice"
mkdir ~/practice
Make directory "~/public_html"
mkdir ~/public_html
Make directory "~/temp"
mkdir ~/temp
Make directorie(s) 'es/LC_MESSAGES' as needed in the current directory
mkdir -p es/LC_MESSAGES
Make directorie(s) 'es_MX.utf8/LC_MESSAGES' as needed in the current directory
mkdir --parents ./es_MX.utf8/LC_MESSAGES
Make directories a, b, c, ..., z under path2 as needed.
mkdir -p path2/{a..z}
Make directory and parents as needed for the directory name of file "$f"
mkdir -p -- "$(dirname -- "$f")"
Make directory and parents as needed for each unique mime type in the current directory
mkdir -p `file -b --mime-type *|uniq`
Make directory and parents as needed to "$FINALPATH"
mkdir -p "$FINALPATH"
Make directories and parents as needed to "${raw_folder}" and "${split_folder}"
mkdir -p ${raw_folder} ${split_folder}
Make directory and parents as needed to "~/temp/bluecove/target/"
mkdir -p ~/temp/bluecove/target/
Make directories as needed in "dest" for every directory found under "src/"
find src/ -type d -exec mkdir -p dest/{} \;
Make directory expanded by $dir variable
mkdir $dir
Make directories for each line in "folder_list.txt"
cat folder_list.txt | xargs mkdir
Make directories for each unique file path in "file1"
cat file1 |xargs -I {} dirname "{}"| sort -u | xargs -I{} mkdir -p "{}"
Make directories in "/TARGET_FOLDER_ROOT/" for each ".mov" file in the current directory tree
find . -type f -iname \*.mov -printf '%h\n' | sort | uniq | xargs -n 1 -d '\n' -I '{}' mkdir -vp "/TARGET_FOLDER_ROOT/{}"
Make directory named in variable "archive" with ".tar*" stripped from the end
mkdir ${archive%.tar*}
Make directories to "$2" as needed
mkdir -p $2
Make directories to "$TARGET_PATH" as needed without causing an error if it exists
mkdir -p "$TARGET_PATH"
Make directories to "/my/other/path/here" as needed
mkdir -p /my/other/path/here
Make directories to "/my/other/path/here/" as needed
mkdir -p /my/other/path/here/
Make directories to "/tmp/boostinst" as needed and print a message for each created directory
mkdir -pv /tmp/boostinst
Make directories to "/tmp/test/blah/oops/something" as needed
mkdir -p /tmp/test/blah/oops/something
Make directories to "x/p/q" as needed
mkdir -p x/p/q
Make directories to file "/full/path/to/file.txt" as needed
mkdir -p `dirname /full/path/to/file.txt`
Make DNS lookup for hostname stackoverflow.com
dig stackoverflow.com
Make DNS lookup requests for domain list in file '/path/to/host-list.txt'
dig -f /path/to/host-list.txt
Make hidden directory ".hiddendir"
mkdir .hiddendir
Make regular files from debian/fglrx-amdcccle/usr/lib/fglrx/bin/ executable for all
find debian/fglrx-amdcccle/usr/lib/fglrx/bin/ -type f | xargs chmod a+x
Make sure the file ".bash_profile" exists in current directory, update its timestamp to current date/time.
touch .bash_profile
To match only hidden dot directories
find /nas01/backups/home/user/ -type d -name ".*" -print0 -exec ls -lrt {} \;
Md5sum the last 5 files in /directory1/directory2/
find /directory1/directory2/ -maxdepth 1 -type f | sort | tail -n 5 | xargs md5sum
Measure the disk space taken up by all *.txt files in the current directory tree
find . -name "*.txt" -print0 |xargs -0 du -ch
Measure the disk space taken up by all *.txt files in the current directory tree
find . -name "*.txt" -print0 |xargs -0 du -ch | tail -n1
Merge already sorted files "*.txt" and split the result into files of at most 1000000 lines each with a numeric suffix and a prefix "output"
sort -m *.txt | split -d -l 1000000 - output
Merge already sorted files "file*.txt" and split the result into files of at most 100000 lines each with a prefix "sorted_file"
sort --merge file*.txt | split -l 100000 - sorted_file
Merge already sorted files in the current directory ending in ".$suffix"
sort -m *.$suffix
Merge already sorted files in the current directory starting with "_tmp" and write the output to "data.tsv.sorted"
sort -m _tmp* -o data.tsv.sorted
Merge colon-separated information from file1 and file2 where second field of both files matches, sorting the result based on this field - for each line, output: first 3 fields of first file, followed by first 3 fields of second file.
join -o 1.1,1.2,1.3,2.1,2.2,2.3 -j2 <(sort -k2 file1) <(sort -k2 file2)
Merge colon-separated information from standard input and file1.txt where the first field of both files matches, print unpairable lines from both files, replace missing fields with "no-match", and output the second field from standard input and the second and third field from file1.txt
join -t, -o 1.2,2.2,2.3 -a 1 -a 2 -e 'no-match' - <(sort file1.txt)
Merge colon-separated information from standard input and file1.txt where the first field of both files matches, print unpairable lines from standard input, replace missing fields with "no-match", and output the second field from standard input and the second and third field from file1.txt
join -t, -o 1.2,2.2,2.3 -a 1 -e 'no-match' - <(sort file1.txt)
Merge content of decompressed files "$part0", "$part1", and so on
sort -m <(zcat $part0 | sort) <(zcat $part1 | sort) ...
Merge data in file1 and file2 where second field is common in both files
join -j2 <(sort -k2 file1) <(sort -k2 file2)
Merge each line of standard input into a single comma separated line
paste -s -d","
Merge each non-blank line of standard input into a single comma separated line
grep -v '^$' | paste -s -d"," -
Merge files 'text.txt' and 'codes.txt' by outputting any lines whose second field in the first matches the first field in the second.
join -1 2 -2 1 text.txt codes.txt
Merge file1 and file2 by outputting all lines where the first comma-separated field of both files matches, followed by extra fields in file1 and those in file2
join -t, <(sort file1) <(sort file2)
Merge the first "$lc" lines of "current.txt" and the last "$lc" lines of "current.txt" and display the result as a comma separated table
paste <(head -"$lc" current.txt) <(tail -"$lc" current.txt) | column -t -o,
Merge lines whose first comma-separated field in file 'in1' also appears as a first comma-separated in file 'in2' - both files must be sorted.
join -t, in1 in2
Merge lines whose first comma-separated field in file 'in1' also appears as a first comma-separated in file 'in2' - both files must be sorted, and the output format of each line will be: first field of in1, second field of in2, and third field of in2.
join -t, -o 1.1,1.2,2.3 in1 in2
modify the permissions of all the folders in a directory
find /path/to/dir -type d -exec chmod 755 {} \;
Monitor 3 specific process IDs: 18884, 18892, and 18919 (GNU specific)
top -p 18884 -p 18892 -p 18919
(GNU specific) Monitor all processes belonging to user 'abc' in batch mode (not accepting user input) and displaying info each 30 seconds up to 10 times.
top -u abc -d 30 -b -n 10
(GNU specific) Monitor process activity, starting with the last remembered "c" state reversed: typing "c" toggles between using process names or full command lines.
top -c
Mount "/dev/shm" using /etc/fstab entry
mount /dev/shm
Mount "/path/to/device" on "/path/to/mount/location" as a loop back device
mount /path/to/device /path/to/mount/location -o loop
Mount "/path/to/device" on "/path/to/mount/location" as a vfat filesystem and a loop back device
mount /path/to/device /path/to/mount/location -o loop -t vfat
Mount "/tmp/loop.img" on "/mnt/image" as a loop back device
mount /tmp/loop.img /mnt/image -o loop
Mount "/windows" using /etc/fstab entry
mount /windows
Mount "cpuset" filesystem on "/cpuset/"
mount -t cpuset none /cpuset/
Mount "device_name" on "mount_point"
sudo mount device_name mount_point
Mount "ext4" filesystem "/dev/xvdf" on "/vol"
sudo mount /dev/xvdf /vol -t ext4
Mount "ext4" filesystem "/dev/xvdf1" on "/vol"
sudo mount /dev/xvdf1 /vol -t ext4
Mount the "linprocfs" filesystem on "/proc"
mount -t linprocfs none /proc
Mount "ntfs-3g" filesystem "/dev/mapper/myvolume" on "/media/volume"
mount -t ntfs-3g /dev/mapper/myvolume /media/volume
Mount "proc" file system on "/var/snmp3/proc"
mount -t proc none /var/snmp3/proc
Mount "tmpfs" filesystem to "/path/to/dir"
mount none -t tmpfs /path/to/dir
Mount the "vboxsf" filesystem "D:\share_folder_vm" on "\share_folder"
sudo mount -t vboxsf D:\share_folder_vm \share_folder
Mount the "vboxsf" filesystem "myFileName" on "~/destination"
sudo mount -t vboxsf myFileName ~/destination
Mount "vfat" filesystem "/dev/sda7" to "/mnt/my_partition" with read and write permission, umask of files and directories set to "0000", and save in fstab and allow ordinary users to mount
sudo mount -t vfat -o rw,auto,user,fmask=0000,dmask=0000 /dev/sda7 /mnt/my_partition
Mount a read only ntfs filesystem
mount -t ntfs
Mount all filesystems in /etc/fstab
sudo mount -a
Mount the directory "/etc" on "/tmp/sarnold/mount_point/"
mount -obind /etc /tmp/sarnold/mount_point/
Mount image "test" to loop device "/dev/loop0"
sudo mount -o loop /dev/loop0 test
Mount partition with label "WHITE" on "/mnt/WHITE" with read and write permission
mount -L WHITE /mnt/WHITE -o rw
Mount remote "cifs" filesystem "//192.168.0.111/serv_share" on "/mnt/my_share" with username "me" and password "mine"
sudo mount -t cifs -o username=me,password=mine //192.168.0.111/serv_share /mnt/my_share
Mount remote "cifs" filesystem "//server/source/" on "/mnt/source-tmp" with username "Username" and password "password"
mount -t cifs //server/source/ /mnt/source-tmp -o username=Username,password=password
Mount remote "smbfs" filesystem "//username@server/share" on "/users/username/smb/share" as soft
mount -t smbfs -o soft //username@server/share /users/username/smb/share
Move "$PHANTOM_JS" to "/usr/local/share" directory
sudo mv $PHANTOM_JS /usr/local/share
Move "/usr/bin/openssl" to directory "/root/"
mv /usr/bin/openssl /root/
Move "caniwrite" without clobbering into "/usr/local/bin"
mv -nv caniwrite /usr/local/bin
Move "file.txt" to docker container "$CONTAINER_ID" in path "/var/lib/docker/devicemapper/mnt/$CONTAINER_ID/rootfs/root/file.txt"
mv -f file.txt /var/lib/docker/devicemapper/mnt/$CONTAINER_ID/rootfs/root/file.txt
Move "file.txt" to docker container "$COUNTAINER_ID" in path "/var/lib/docker/aufs/mnt/$CONTAINER_ID/rootfs/root/file.txt"
mv -f file.txt /var/lib/docker/aufs/mnt/$CONTAINER_ID/rootfs/root/file.txt
Move "file1", "file2", "..." to "target" directory
mv -t target file1 file2 ...
Move "phantomjs-1.8.1-linux-x86_64.tar.bz2" to "/usr/local/share/" directory
sudo mv phantomjs-1.8.1-linux-x86_64.tar.bz2 /usr/local/share/.
Move "tobecopied/tobeexclude" to "tobeexclude"
mv tobecopied/tobeexclude tobeexclude;
Move "tobecopied/tobeexcluded" to the current directory
mv tobecopied/tobeexcluded .
Move *wp-admin/index.php files under /var/www/ to ./index_disabled
find /var/www/ -path '*wp-admin/index.php' -exec mv {} $(dirname {})/index_disabled
Move all *.data files/directories in $S directory to $S/data/ directory
find "${S}" -name '*.data' -exec mv '{}' "${S}/data/" \;