-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMedia_and_Files.alias
executable file
·64 lines (54 loc) · 3.74 KB
/
Media_and_Files.alias
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Media & Files
# ----------------------------
### YouTube and Video Handling
alias yt-audio='yt-dlp -x --audio-format mp3' # Download YouTube audio
alias yt-video='yt-dlp -f bestvideo+bestaudio' # Download YouTube video
alias yt-playlist='yt-dlp -f best -ci --yes-playlist' # Download entire YouTube playlist
alias vid-convert='ffmpeg' # Video conversion
alias vid-to-gif='ffmpeg -i $1 -vf "fps=10,scale=320:-1" $2.gif' # Convert video to GIF
### Audio Manipulation
alias mp3-info='ffprobe -i $1' # Get MP3 file info
alias mp3-trim='ffmpeg -i $1 -ss $2 -to $3 -c copy $4' # Trim MP3 file
### Image Manipulation
alias img-optimize='jpegoptim' # Optimize JPEG images
alias img-resize='convert $1 -resize $2 $3' # Resize image (requires ImageMagick)
alias img-info='identify $1' # Get image information
alias img-to-png='convert $1 $2.png' # Convert image to PNG
### PDF Handling
alias pdf-merge='pdfunite' # Merge multiple PDFs
alias pdf-split='pdftk $1 burst output page_%02d.pdf' # Split PDF into individual pages
alias pdf-compress='gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -q -o $2 $1' # Compress PDF
### Archive and Compression
alias zipf='zip -r $1.zip $2' # Compress folder into zip
alias unzipf='unzip $1' # Extract zip archive
alias tarf='tar -cvf $1.tar $2' # Create tar archive
alias untar='tar -xvf $1' # Extract tar archive
alias gz-compress='gzip $1' # Compress file with gzip
alias gz-decompress='gunzip $1' # Decompress gzip file
### File Searching and Metadata
alias findf='find . -type f -name' # Find files by name
alias findd='find . -type d -name' # Find directories by name
alias filetype='file $1' # Check file type
alias filesize='du -h $1' # Check file size
alias md5sum='md5sum $1' # Get MD5 checksum
alias sha256sum='sha256sum $1' # Get SHA-256 checksum
### File Viewing and Playback
alias play-audio='mpv $1' # Play audio file
alias play-video='mpv $1' # Play video file
alias webcam='mpv av://v4l2:/dev/video0' # Quick webcam view
alias img-view='feh $1' # View image (requires feh)
alias pdf-view='evince $1' # View PDF (requires Evince)
### Clipboard and Text Operations
alias copy='xclip -sel clip' # Copy to clipboard
alias paste='xclip -o -sel clip' # Paste from clipboard
alias file-head='head -n 10 $1' # View first 10 lines of file
alias file-tail='tail -n 10 $1' # View last 10 lines of file
alias file-cat='cat $1 | less' # View file with pagination
### File Cleanup
alias rm-empty='sudo find . -type d -empty -delete' # Remove empty directories
alias rm-large='find . -size +100M -exec rm -i {} \;' # Remove files larger than 100MB
alias rm-temp='find . -name "*.tmp" -exec rm -i {} \;' # Remove temporary files
### File Backup
alias backup='cp -r $1 $1_backup_$(date +%Y%m%d%H%M%S)' # Create a timestamped backup
alias sync-dir='rsync -avz $1 $2' # Sync two directories
alias archive-dir='tar -czvf $1.tar.gz $2' # Archive and compress a directory